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
fastest and smallest in lines solution:
fiby = ->(n, prev, i, count, selfy) { i < count ? (selfy.call n + prev, n, i + 1, count, selfy) : (puts n) } fiby.call 0, 1, 0, 1000, fiby
functional selfie pattern :)