1
0
Fork 0
forked from koniifer/ableos
ableos-framebuffer/hblang/examples/if_statement.hb

13 lines
136 B
Plaintext
Raw Normal View History

main := ||: int {
return fib(10);
}
fib := |x: int|: int {
if x <= 2 {
return 1;
2024-05-11 11:16:27 -05:00
} else {
return fib(x - 1) + fib(x - 2);
}
}