zongors-reality-engine/test/bench/fib.lua

9 lines
117 B
Lua

function fib(n)
if n < 2 then return n end
return fib(n-1) + fib(n-2)
end
local result = fib(35)
print(result)