slige/examples/example_2.slg

18 lines
232 B
Plaintext
Raw Normal View History

2024-12-11 11:36:19 +00:00
fn add(a: int, b: int) -> int {
2024-11-20 21:12:08 +00:00
+ a b
}
2024-12-11 11:36:19 +00:00
fn main() -> int {
let result = 0;
let i = 0;
loop {
if >= i 10 {
break;
}
result = add(result, 5);
i = + i 1;
2024-11-20 21:12:08 +00:00
}
2024-12-11 11:36:19 +00:00
result
2024-11-20 21:12:08 +00:00
}