4 ms·
Yes. I added that to tests and README. Except that I have fib = +lambda {|n| return n if n <= 1; fib[n-1] + fib[n-1] } My fibonacci is 0, 1, 1, 2, 3.. and
by irahul 15y ago
Yes. I added that to tests and README. Except that I have
fib = +lambda {|n| return n if n <= 1; fib[n-1] + fib[n-1] }
My fibonacci is 0, 1, 1, 2, 3.. and yours is 1, 1, 2, 3... but doesn't make a difference as far as example goes.