Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Corrects a typo on foldRight's example
  • Loading branch information
Omid Aladini committed Oct 4, 2011
commit ece27fa763ea41cd389782ee43284e3969141670
2 changes: 1 addition & 1 deletion web/_posts/2011-05-03-lesson.textile
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ h5. foldRight
Is the same as foldLeft except it runs in the opposite direction.

<pre>
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 }
m: 10 n: 0
m: 9 n: 10
m: 8 n: 19
Expand Down