rhea/assets/examples/loops.rhea

18 lines
342 B
Plaintext

func main(){
var i = 0;
// The only loop is `loop` and it does not do any form of count up and break
loop {
match i {
// break will break out of `one` loop
10 -> break;
}
// Increment by one
i = i + 1;
}
// This is functionally identical to a HCF
loop {}
}