Slide 9
Slide 9 text
Lambda
• To be generic, lambda or lambda expressions generally means anonymous functions,
that is, functions without names, which can be assigned to variables, passed as
arguments, or returned from another function
fun invokeSomeStuff(doSomeStuff:()->Unit) {
doSomeStuff()
}
fun main(args: Array) {
invokeSomeStuff {
println("doSomeStuff called");
}
}