Skip to content

Instantly share code, notes, and snippets.

@erikerlandson
Created May 14, 2014 16:19
Show Gist options
  • Save erikerlandson/3a2a8a5012cb9af66769 to your computer and use it in GitHub Desktop.
Save erikerlandson/3a2a8a5012cb9af66769 to your computer and use it in GitHub Desktop.
bad functions
scala> val f1 = (x:Int, t:Int) => (x > t)
f1: (Int, Int) => Boolean = <function2>
scala> f1
res22: (Int, Int) => Boolean = <function2>
scala> val f2 = (x:Int, t:Int=7) => (x > t)
<console>:1: error: ')' expected but '=' found.
val f2 = (x:Int, t:Int=7) => (x > t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment