Skip to content

Commit

Permalink
Merge pull request #27 from bowmanb/master
Browse files Browse the repository at this point in the history
a couple fixes for compilation errors
  • Loading branch information
lahosken committed Aug 9, 2012
2 parents e566bb1 + 68ddd75 commit 073661a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/_posts/2011-05-03-lesson.textile
Expand Up @@ -91,7 +91,7 @@ Map(1 -> Map("foo" -> "bar"))
</pre>

<pre>
Map("timesTwo" -> timesTwo(_))
Map("timesTwo" -> { timesTwo(_) })
</pre>

h3. Option
Expand Down Expand Up @@ -328,7 +328,7 @@ res0: List[Int] = List(2, 4, 6, 8)
Think of it as short-hand for mapping and then flattening:

<pre>
scala> nestedNumbers.map(x: List[Int] => x.map(_ * 2)).flatten
scala> nestedNumbers.map((x: List[Int]) => x.map(_ * 2)).flatten
res1: List[Int] = List(2, 4, 6, 8)
</pre>

Expand Down

0 comments on commit 073661a

Please sign in to comment.