`break` and `continue` in `forEach` in Kotlin
Kotlin has very nice iterating functions, like forEach or repeat, but I am not able to make the break and continue operators work with them (both local and non-local): repeat(5) { break } (1..5).forEach { continue@forEach } The goal is to mimic usual loops with the functional syntax as close as it might be. It … Read more