Skip to content

Instantly share code, notes, and snippets.

@sagarpatel288
Created April 23, 2020 12:29
Show Gist options
  • Save sagarpatel288/8d2f69af5f99579765cdc502d4bb6f80 to your computer and use it in GitHub Desktop.
Save sagarpatel288/8d2f69af5f99579765cdc502d4bb6f80 to your computer and use it in GitHub Desktop.
Passing a function literal as an argument for a higher order function
//Calling a higher order function
println(doSomething(1, 2, {x: Int, y: Int -> x + y}))
//prints: doSomething: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment