We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 60358aa + ece27fa commit 4300be0Copy full SHA for 4300be0
web/_posts/2011-05-03-lesson.textile
@@ -291,7 +291,7 @@ h5. foldRight
291
Is the same as foldLeft except it runs in the opposite direction.
292
293
<pre>
294
-scala> numbers.foldRight(0)((m: Int, n: Int) => println("m: " + m + " n: " + n); m + n)
+scala> numbers.foldRight(0) { (m: Int, n: Int) => println("m: " + m + " n: " + n); m + n }
295
m: 10 n: 0
296
m: 9 n: 10
297
m: 8 n: 19
0 commit comments