Skip to content

Commit a80545a

Browse files
authored
Merge pull request scala/scala#9002 from asakaev/fix-formatting
Fix TailCalls formatting
2 parents fb93934 + acb3a6c commit a80545a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/util/control/TailCalls.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ package util.control
3737
* if (n < 2) done(n) else for {
3838
* x <- tailcall(fib(n - 1))
3939
* y <- tailcall(fib(n - 2))
40-
* } yield (x + y)
40+
* } yield x + y
4141
*
4242
* fib(40).result
4343
* }}}
@@ -57,7 +57,7 @@ object TailCalls {
5757
final def flatMap[B](f: A => TailRec[B]): TailRec[B] =
5858
this match {
5959
case Done(a) => Call(() => f(a))
60-
case c@Call(_) => Cont(c, f)
60+
case c @ Call(_) => Cont(c, f)
6161
// Take advantage of the monad associative law to optimize the size of the required stack
6262
case c: Cont[a1, b1] => Cont(c.a, (x: a1) => c.f(x) flatMap f)
6363
}

0 commit comments

Comments
 (0)