diff options
author | Paul Phillips <paulp@improving.org> | 2010-01-18 05:02:30 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-01-18 05:02:30 +0000 |
commit | 853b1817beb5f8b55ecbd1ffdf0e226fc699acae (patch) | |
tree | ce44fe7e2cc25670aecd70f36e70ae9f0cfe399f /src/library/scala/Tuple2.scala | |
parent | d73a32db9cb0357cb365b78bdbd0fa8d6af9873c (diff) | |
download | scala-853b1817beb5f8b55ecbd1ffdf0e226fc699acae.tar.gz scala-853b1817beb5f8b55ecbd1ffdf0e226fc699acae.tar.bz2 scala-853b1817beb5f8b55ecbd1ffdf0e226fc699acae.zip |
Adjectified some parts of speech as discussed o...
Adjectified some parts of speech as discussed on the mailing list. The
methods to call on FunctionN are "curried" and "tupled" with "curry"
deprecated and "tuple" gone. Closes #2907. Review by community.
Diffstat (limited to 'src/library/scala/Tuple2.scala')
-rw-r--r-- | src/library/scala/Tuple2.scala | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/library/scala/Tuple2.scala b/src/library/scala/Tuple2.scala index c20f521afb..2a4797ab5a 100644 --- a/src/library/scala/Tuple2.scala +++ b/src/library/scala/Tuple2.scala @@ -8,7 +8,7 @@ // $Id$ -// generated by genprod on Wed Jun 17 14:10:05 PDT 2009 (with extra methods) +// generated by genprod on Sun Jan 17 19:38:09 PST 2010 (with extra methods) package scala @@ -19,12 +19,10 @@ import scala.collection.generic.CanBuildFrom /** Tuple2 is the canonical representation of a @see Product2 * */ -case class Tuple2[+T1, +T2](_1:T1, _2:T2) extends Product2[T1, T2] { - override def toString() = { - val sb = new StringBuilder - sb.append('(').append(_1).append(',').append(_2).append(')') - sb.toString - } +case class Tuple2[+T1, +T2](_1:T1,_2:T2) + extends Product2[T1, T2] +{ + override def toString() = "(" + _1 + "," + _2 + ")" /** Swap the elements of the tuple */ def swap: Tuple2[T2,T1] = Tuple2(_2, _1) |