Skip to content

Instantly share code, notes, and snippets.

@pedrolopesme
Created June 11, 2017 20:46
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 pedrolopesme/3425a379dbce9e5d2d5066b432b39c59 to your computer and use it in GitHub Desktop.
Save pedrolopesme/3425a379dbce9e5d2d5066b432b39c59 to your computer and use it in GitHub Desktop.
fun main(args: Array<String>) {
val sum: (Int, Int) -> Int = { x, y -> x + y }
println(sum(2,3)) // -> Imprime 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment