diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-06-16 16:40:02 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-06-16 16:40:02 +0000 |
commit | 97bd54ecf38bd8c4a29e2aee655fdbf7c29b0dcd (patch) | |
tree | 103f54b31ea06682950ec62e848e91df73f5e3ee /src/library/scala/collection/TraversableOnce.scala | |
parent | e3fd6b82e0c93874e676959d06ad81fd5df6fc23 (diff) | |
download | scala-97bd54ecf38bd8c4a29e2aee655fdbf7c29b0dcd.tar.gz scala-97bd54ecf38bd8c4a29e2aee655fdbf7c29b0dcd.tar.bz2 scala-97bd54ecf38bd8c4a29e2aee655fdbf7c29b0dcd.zip |
Fixes #3563. Review by extempore.
Diffstat (limited to 'src/library/scala/collection/TraversableOnce.scala')
-rw-r--r-- | src/library/scala/collection/TraversableOnce.scala | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/library/scala/collection/TraversableOnce.scala b/src/library/scala/collection/TraversableOnce.scala index 6bedf025d4..de4eb6fc22 100644 --- a/src/library/scala/collection/TraversableOnce.scala +++ b/src/library/scala/collection/TraversableOnce.scala @@ -399,15 +399,19 @@ trait TraversableOnce[+A] { def toList: List[A] = new ListBuffer[A] ++= self toList /** Converts this $coll to an iterable collection. Note that - * the choice of target Iterable must be lazy as this TraversableOnce - * may be lazy and unevaluated. + * the choice of target `Iterable` is lazy in this default implementation + * as this `TraversableOnce` may be lazy and unevaluated (i.e. it may + * be an iterator which is only traversable once). * * $willNotTerminateInf * @return an `Iterable` containing all elements of this $coll. */ def toIterable: Iterable[A] = toStream - /** Converts this $coll to a sequence. As with toIterable, it must be lazy. + /** Converts this $coll to a sequence. As with `toIterable`, it's lazy + * in this default implementation, as this `TraversableOnce` may be + * lazy and unevaluated. + * * $willNotTerminateInf * @return a sequence containing all elements of this $coll. */ |