https://kotlinlang.org logo
#server
Title
# server
e

Exerosis

01/08/2022, 8:01 PM
Copy code
var cancel = false
var i = 0
this.forEach {
    if (!cancel) {
        val result = !it(using, interaction)
        println("${i++} cancelled = $result")
        if (result) {
            println("cancelling")
            cancel = true
        }
    }
}
So I've got this code, forEach in theory has 11 elements to loop. The 5th element cancels.
🧵 3