Skip to content

Commit 4300be0

Browse files
committed
Merge pull request twitter#12 from omidaladini/master
Corrects a typo on foldRight's example
2 parents 60358aa + ece27fa commit 4300be0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/_posts/2011-05-03-lesson.textile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ h5. foldRight
291291
Is the same as foldLeft except it runs in the opposite direction.
292292

293293
<pre>
294-
scala> numbers.foldRight(0)((m: Int, n: Int) => println("m: " + m + " n: " + n); m + n)
294+
scala> numbers.foldRight(0) { (m: Int, n: Int) => println("m: " + m + " n: " + n); m + n }
295295
m: 10 n: 0
296296
m: 9 n: 10
297297
m: 8 n: 19

0 commit comments

Comments
 (0)