leo/compiler/tests/statements/conditional/for_loop.leo

12 lines
144 B
Plaintext
Raw Normal View History

function main(cond: bool) -> u32 {
2020-07-17 22:59:18 +03:00
let mut a = 0u32;
2020-07-17 22:59:18 +03:00
if cond {
for i in 0..4 {
a += i;
}
}
2020-07-17 22:59:18 +03:00
return a
}