Skip to content

Instantly share code, notes, and snippets.

@stephenLee
Created September 17, 2012 12:28
Show Gist options
  • Save stephenLee/3737017 to your computer and use it in GitHub Desktop.
Save stephenLee/3737017 to your computer and use it in GitHub Desktop.
Scala partially applied function demo
def sum(a: Int, b: Int, c: Int): Int = a + b + c
val a = sum _
a(1,2,3)
val b = sum(1, _: Int, 3)
b(2)
b(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment