diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2009-09-24 14:50:17 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2009-09-24 14:50:17 +0000 |
commit | e1b326195e47fe28cbbd9585e2e15dddf0bb1361 (patch) | |
tree | 5d32d1a1abb7311ca075dd35e43dc7cf12e17f50 | |
parent | f19fd024e0b0d8e59589425babe5ec4656ebb867 (diff) | |
download | scala-e1b326195e47fe28cbbd9585e2e15dddf0bb1361.tar.gz scala-e1b326195e47fe28cbbd9585e2e15dddf0bb1361.tar.bz2 scala-e1b326195e47fe28cbbd9585e2e15dddf0bb1361.zip |
Removed another dead file.
-rw-r--r-- | src/library/scala/Tuple2.scala.notyet | 83 | ||||
-rw-r--r-- | src/library/scala/collection/Iterator.scala | 2 |
2 files changed, 1 insertions, 84 deletions
diff --git a/src/library/scala/Tuple2.scala.notyet b/src/library/scala/Tuple2.scala.notyet deleted file mode 100644 index fb8a27e181..0000000000 --- a/src/library/scala/Tuple2.scala.notyet +++ /dev/null @@ -1,83 +0,0 @@ - -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2008, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -// generated by genprod on Wed Apr 23 10:06:16 CEST 2008 (with extra methods) - -package scala - -object Tuple2 { - class IterableOps[CC[+B] <: Iterable[B], A1, A2](tuple: (CC[A1], Iterable[A2])) { - def zip: CC[(A1, A2)] = { - val elems1 = tuple._1.iterator - val elems2 = tuple._2.iterator - val b = tuple._1.newBuilder[B] - while (elems1.hasNext && elems2.hasNext) - b += ((elems1.next, elems2.next)) - b.result - } - def map[B](f: (A1, A2) => B): CC[B] = { - val elems1 = tuple._1.iterator - val elems2 = tuple._2.iterator - val b = tuple._1.newBuilder[B] - while (elems1.hasNext && elems2.hasNext) - b += f(elems1.next, elems2.next) - b.result - } - def flatMap[B](f: (A1, A2) => CC[B]) CC[B] = { - val elems1 = tuple._1.iterator - val elems2 = tuple._2.iterator - val b = tuple._1.newBuilder[B] - while (elems1.hasNext && elems2.hasNext) - b ++= f(elems1.next, elems2.next) - b.result - } - def foreach(f: (A1, A2) => Unit) { - val elems1 = tuple._1.iterator - val elems2 = tuple._2.iterator - while (elems1.hasNext && elems2.hasNext) - f(elems1.next, elems2.next) - } - def forall(p: (A1, A2) => Boolean): Boolean = { - val elems1 = tuple._1.iterator - val elems2 = tuple._2.iterator - while (elems1.hasNext && elems2.hasNext) - if (!p(elems1.next, elems2.next)) return false - true - } - def exists(p: (A1, A2) => Boolean): Boolean = { - val elems1 = tuple._1.iterator - val elems2 = tuple._2.iterator - while (elems1.hasNext && elems2.hasNext) - if (p(elems1.next, elems2.next)) return true - false - } - } - - implicit def tupleOfIterableWrapper[CC[+B] <: Iterable[B], A1, A2](tuple: (CC[A1], Iterable[A2])) = - new IterableOps(tuple) -} - -/** 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 - } - - /** Swap the elements of the tuple */ - def swap: Tuple2[T2,T1] = Tuple2(_2, _1) - -} diff --git a/src/library/scala/collection/Iterator.scala b/src/library/scala/collection/Iterator.scala index df9219bc24..9b1e56ba23 100644 --- a/src/library/scala/collection/Iterator.scala +++ b/src/library/scala/collection/Iterator.scala @@ -678,7 +678,7 @@ trait Iterator[+A] { self => * * @param op The operator to apply * @return <code>op(... op(a<sub>0</sub>,a<sub>1</sub>), ..., a<sub>n</sub>)</code> - if the iterator yields elements + * if the iterator yields elements * <code>a<sub>0</sub>, a<sub>1</sub>, ..., a<sub>n</sub></code>. * @throws Predef.UnsupportedOperationException if the iterator is empty. */ |