kotlin/後置ラムダ構文
#Kotlin
こんな感じの関数をつくると、
code:kotlin
fun hoge(
foo: String,
a: () -> Unit = {},
) {
printf(foo)
a()
}
こんな感じに呼び出せる:
code:kotlin
hoge("foo") {
printf("lambda")
}