I\'m trying to implement the following function, but it keeps giving me the stack level too deep (SystemStackError) error.
stack level too deep (SystemStackError)
Any ideas what the problem mi
Try this oneliner
def fib (n) n == 0 || n == 1 ? n : fib(n-2) + fib(n-1) end print fib(16)
Output: 987