Break

The break keyword exits a loop:

a := 4
loop {
    a -= 1
    if a < 0 { break }
}

To exit an outer loop, use a label:

'outer: loop {
    loop {
        break 'outer
    }
}

In a mathematical loop, break skips the rest:

fn main() {
    list := [1, 2, 3]
    println(sum i {
        if i > 1 { break } // skip `3`
        list[i]
    }) // prints `3`
}