|
|
|
|
|
by brabel
884 days ago
|
|
One of the only languages where I saw this non-local returns is Kotlin. You can return from a function from within a lambda (and I believe this works on any number of levels), for example: fun go(list: List<String>): Boolean {
list.forEach { if (it.isEmpty()) return@go true }
return false
}
|
|
Smalltalk, and I believe ruby, allow non local return from blocks.