holey-bytes/hblang/examples/if_statement.hb
2024-05-11 22:22:12 +02:00

13 lines
140 B
Plaintext

main := fn(): int {
return fib(10);
}
fib := fn(x: int): int {
if x <= 2 {
return 1;
} else {
return fib(x - 1) + fib(x - 2);
}
}