a return statement always returns from the nearest...
# android
k
a return statement always returns from the nearest block.. so if you had something like
fun something(x: List<String>) { x.forEach { ...; return something; }}
, you would be returning from the inner lambda
👍 3
u
kiku: no, by default
return
returns from nearest lexical
fun
keyworded function. So if you want to return from passed lambda use label
return@forEach