Created
July 12, 2011 22:12
-
-
Save mneedham/1079110 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wanted to understand why this fails to compile: | |
List(("Mark", 4), ("Charles", 5)).filter(case(name, number) => number == 4) | |
:1: error: illegal start of simple expression | |
List(("Mark", 4), ("Charles", 5)).filter(case(name, number) => number == 4) | |
Yet this works fine: | |
List(("Mark", 4), ("Charles", 5)).filter{case(name, number) => number == 4} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment