diff options
author | michelou <michelou@epfl.ch> | 2007-02-05 13:07:41 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-02-05 13:07:41 +0000 |
commit | 611f4541686a87ba6d871a95951d476a288816a4 (patch) | |
tree | 922347a5fc11ecd340370b40b480a7601980dcf4 /src/library | |
parent | 50ce776c18e2fb715b78be3c9d1d4dbbd07fba62 (diff) | |
download | scala-611f4541686a87ba6d871a95951d476a288816a4.tar.gz scala-611f4541686a87ba6d871a95951d476a288816a4.tar.bz2 scala-611f4541686a87ba6d871a95951d476a288816a4.zip |
fixed compilation error in CopyPropagation.scala
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Iterable.scala | 24 | ||||
-rw-r--r-- | src/library/scala/IterableProxy.scala | 4 |
2 files changed, 13 insertions, 15 deletions
diff --git a/src/library/scala/Iterable.scala b/src/library/scala/Iterable.scala index 6ef8e2ec06..916b0ecdf4 100644 --- a/src/library/scala/Iterable.scala +++ b/src/library/scala/Iterable.scala @@ -1,6 +1,6 @@ /* __ *\ ** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL ** +** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** @@ -88,19 +88,15 @@ trait Iterable[+A] { */ def elements: Iterator[A] - /** Appends two iterable objects + /** Appends two iterable objects. * * @return the new iterable object * @deprecated use <code>++</code> instead */ - [deprecated] def concat [B >: A](that: Iterable[B]): Iterable[B] = { - val buf = new ArrayBuffer[B] - this copyToBuffer buf - that copyToBuffer buf - buf - } + [deprecated] def concat[B >: A](that: Iterable[B]): Iterable[B] = + this ++ that - /** Appends two iterable objects + /** Appends two iterable objects. * * @return the new iterable object */ @@ -111,11 +107,12 @@ trait Iterable[+A] { buf } - /** Returns the iterable resulting from applying the given function <code>f</code> to each - * element of this iterable. + /** Returns the iterable resulting from applying the given function + * <code>f</code> to each element of this iterable. * * @param f function to apply to each element. - * @return <code>f(a0), ..., f(an)</code> if this iterable is <code>a0, ..., an</code>. + * @return <code>f(a<sub>0</sub>), ..., f(a<sub>n</sub>)</code> + * if this iterable is <code>a<sub>0</sub>, ..., an</code>. */ def map[B](f: A => B): Iterable[B] = { val buf = new ArrayBuffer[B] @@ -182,7 +179,8 @@ trait Iterable[+A] { new ArrayBuffer[A] ++ elements.take(n) /** Returns this iterable without its <code>n</code> first elements - * If this iterable has less than <code>n</code> elements, the empty iterable is returned. + * If this iterable has less than <code>n</code> elements, the empty + * iterable is returned. * * @param n the number of elements to drop * @return the new iterable diff --git a/src/library/scala/IterableProxy.scala b/src/library/scala/IterableProxy.scala index 642b352694..a69fc91dd4 100644 --- a/src/library/scala/IterableProxy.scala +++ b/src/library/scala/IterableProxy.scala @@ -1,6 +1,6 @@ /* __ *\ ** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL ** +** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** @@ -11,7 +11,7 @@ package scala -import collection.mutable.Buffer +import scala.collection.mutable.Buffer import scala.compat.StringBuilder |