leo/asg/tests/pass/function/iteration_repeated.leo

15 lines
207 B
Plaintext
Raw Normal View History

2021-01-25 18:17:42 +03:00
function iteration() -> u32 {
let a = 0u32;
2021-01-25 18:17:42 +03:00
for i in 0..10 {
a += 1;
}
return a
}
function main() {
const total = iteration() + iteration();
2021-01-25 18:17:42 +03:00
console.assert(total == 20);
}