Skip to content

Commit

Permalink
Corrected map combinator example
Browse files Browse the repository at this point in the history
  • Loading branch information
s4nk committed Jan 13, 2015
1 parent 5ed128e commit a081829
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/collections.textile
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ scala> numbers.map((i: Int) => i * 2)
res0: List[Int] = List(2, 4, 6, 8)
</pre>

or pass in a partially evaluated function
or pass in a function

<pre>

scala> def timesTwo(i: Int): Int = i * 2
timesTwo: (i: Int)Int

scala> numbers.map(timesTwo _)
scala> numbers.map(timesTwo)
res0: List[Int] = List(2, 4, 6, 8)
</pre>

Expand Down

0 comments on commit a081829

Please sign in to comment.