forked from koniifer/ableos
20 lines
188 B
Plaintext
20 lines
188 B
Plaintext
|
main := ||: int {
|
||
|
return fib(10);
|
||
|
}
|
||
|
|
||
|
fib := |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;
|
||
|
}
|