1
0
Fork 0
forked from koniifer/ableos
ableos-framebuffer/hblang/examples/loops.hb
2024-05-11 22:22:12 +02:00

20 lines
192 B
Plaintext

main := fn(): int {
return fib(10);
}
fib := fn(n: int): int {
a := 0;
b := 1;
loop {
c := a + b;
a = b;
b = c;
n = n - 1;
if n == 0 {
break;
}
continue;
}
return a;
}