Slide 22
Slide 22 text
Kotlin in Android
Kotlin User Group Belgium
Lambdas in Kotlin
val sum = { x: Int, y: Int -> x + y }
A lambda expression or an anonymous function is a "function literal", i.e. a function that is not declared, but
passed immediately as an expression.
The full syntactic form of lambda expressions, i.e. literals of function types, is as follows:
val sum: (Int, Int) -> Int = { x, y -> x + y }