Files
monkey/examples/fibt.monkey
Chuck Smith 997f0865f4
Some checks failed
Build / build (push) Failing after 1m40s
Test / build (push) Failing after 11m47s
Extra Features
2024-03-14 21:25:47 -04:00

11 lines
143 B
Plaintext

let fib = fn(n, a, b) {
if (n == 0) {
return a
}
if (n == 1) {
return b
}
return fib(n - 1, b, a + b)
}
print(fib(35, 0, 1))