summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2012-09-26 06:16:47 -0700
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2012-09-26 06:16:47 -0700
commit512b437f17627d84e98d48658529109dc109650f (patch)
treeefb02c9e1f9d6e78e1ea55491eb492dc07986a6e /src
parent56b2db29fee15d7b73a81cf1b8d8ca47bd4b68da (diff)
parent0263e725045ee6404b8f523db0e8be1b09ab0ec9 (diff)
downloadscala-512b437f17627d84e98d48658529109dc109650f.tar.gz
scala-512b437f17627d84e98d48658529109dc109650f.tar.bz2
scala-512b437f17627d84e98d48658529109dc109650f.zip
Merge pull request #1397 from jsuereth/fix/SI-6409
Improves SI-6409 - Add note to string flatMap about evaluation.
Diffstat (limited to 'src')
-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