diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-11-27 16:40:51 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-11-27 16:40:51 +0100 |
commit | 8b7fe54a5d74e1655ebaeb62492833740996fc92 (patch) | |
tree | 09c30fb49e1b6c478d87ff115ee2da6208c896f9 | |
parent | 5c0386922f410fdf078d4a0bfc5a8a4bc4d8bd61 (diff) | |
parent | 0bf5b2cdd5a69a581bb6387688c3abc73796cfa8 (diff) | |
download | scala-8b7fe54a5d74e1655ebaeb62492833740996fc92.tar.gz scala-8b7fe54a5d74e1655ebaeb62492833740996fc92.tar.bz2 scala-8b7fe54a5d74e1655ebaeb62492833740996fc92.zip |
Merge pull request #4866 from CaseyLeask/clarify-source-of-f-function
Clarify source of f function in TailCalls flatMap
-rw-r--r-- | src/library/scala/util/control/TailCalls.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/util/control/TailCalls.scala b/src/library/scala/util/control/TailCalls.scala index 953d5b407e..c7fefb1eba 100644 --- a/src/library/scala/util/control/TailCalls.scala +++ b/src/library/scala/util/control/TailCalls.scala @@ -55,7 +55,7 @@ object TailCalls { case Done(a) => Call(() => f(a)) case c@Call(_) => Cont(c, f) // Take advantage of the monad associative law to optimize the size of the required stack - case c: Cont[a1, b1] => Cont(c.a, (x: a1) => c f x flatMap f) + case c: Cont[a1, b1] => Cont(c.a, (x: a1) => c.f(x) flatMap f) } /** Returns either the next step of the tailcalling computation, |