Lambda as Final Parameter

  • Lift final lambda parameter out of ()
  • Make function calls look like built-in language blocks

fun f(lambda: (Int) -> String) 

val s = f(lambda = { 
  it.toString()
})
val s = f { 
  it.toString()
}
Back Home Next