Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas
Created December 29, 2020 12:39
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 PatilShreyas/a21e072fa843a33e5cb21d07cf17da37 to your computer and use it in GitHub Desktop.
Save PatilShreyas/a21e072fa843a33e5cb21d07cf17da37 to your computer and use it in GitHub Desktop.
fun main() {
val add: (Int, Int) -> Int = {a, b -> a + b}
val result = add(10, 20)
println(result) // prints "30"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment