Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created January 18, 2012 01:06
Show Gist options
  • Select an option

  • Save diegopacheco/1630134 to your computer and use it in GitHub Desktop.

Select an option

Save diegopacheco/1630134 to your computer and use it in GitHub Desktop.
Currying in Scala
def add(n:Int)(a:Int) = n + a
val add2 = add(2)(_)
add(5)(5) // 10
add2(30) // 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment