Files
LXC/examples/Fib.lx
2025-08-20 21:25:33 +01:00

16 lines
211 B
Plaintext

func<int> fib(int: num)
{
# Base cases #
if (n == 0) { return 0 }
if (n == 1) { return 1 }
# RECURSION BABYYYY #
return fib(n - 1) + fib(n - 2)
}
func<int> main()
{
int: res = fib(8)
return res == 21
}