Files
LXC/examples/Fib.lx
2025-08-04 15:46:19 +01:00

16 lines
235 B
Plaintext

func<int> fib(int: num)
{
# Base cases (temp excluded) #
# 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
}