Skip to content

Instantly share code, notes, and snippets.

@mneedham
Created July 12, 2011 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mneedham/1079110 to your computer and use it in GitHub Desktop.
Save mneedham/1079110 to your computer and use it in GitHub Desktop.
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