summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/immutable/Stream.scala
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-09-25 14:06:29 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-09-25 14:06:59 -0400
commit0263e725045ee6404b8f523db0e8be1b09ab0ec9 (patch)
treedcb28d856ea4bd6e7db1b2af12582633bff0b009 /src/library/scala/collection/immutable/Stream.scala
parentf284ac55c931249a49499a7831de4d25213d34b8 (diff)
downloadscala-0263e725045ee6404b8f523db0e8be1b09ab0ec9.tar.gz
scala-0263e725045ee6404b8f523db0e8be1b09ab0ec9.tar.bz2
scala-0263e725045ee6404b8f523db0e8be1b09ab0ec9.zip
Improves SI-6409 - Add note to string flatMap about evaluation.
Note: flatMap has to evaluate the stream until it finds a head for the new stream. This is a limitation that will exist for 2.10.0, but the bug will remain open.
Diffstat (limited to 'src/library/scala/collection/immutable/Stream.scala')
-rw-r--r--src/library/scala/collection/immutable/Stream.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala
index bac90341ec..461a375317 100644
--- a/src/library/scala/collection/immutable/Stream.scala
+++ b/src/library/scala/collection/immutable/Stream.scala
@@ -422,6 +422,9 @@ self =>
* // produces: 10, 10, 11, 10, 11, 11, 10, 11, 11, 12, 10, 11, 11, 12, 13
* }}}
*
+ * ''Note:'' Currently `flatMap` will evaluate as much of the Stream as needed
+ * until it finds a non-empty element for the head, which is non-lazy.
+ *
* @tparam B The element type of the returned collection '''That'''.
* @param f the function to apply on each element.
* @return `f(a,,0,,) ::: ... ::: f(a,,n,,)` if