leo/tests/pass/parse/function/iteration_repeated.leo

15 lines
209 B
Plaintext
Raw Normal View History

2021-03-03 20:59:24 +03:00
function iteration() -> u32 {
let mut a = 0u32;
for i in 0..10 {
a += 1;
}
return a
}
function main() {
let total = iteration() + iteration();
console.assert(total == 20);
}