Merge pull request #139 from amrnt/master

fix fib function for Lua: fib(0) must eql 0 not 1
This commit is contained in:
Adam Bard 2013-07-29 00:06:57 -07:00
commit d2b5b51b9c

View File

@ -87,7 +87,7 @@ until num == 0
----------------------------------------------------
function fib(n)
if n < 2 then return 1 end
if n < 2 then return n end
return fib(n - 2) + fib(n - 1)
end