Closed epatrizio closed 4 months ago
Check example Fibonacci -- 2: Recursive version with memoization https://github.com/epatrizio/ola/blob/main/examples/fibonacci.lua
Memoization does not work:
local fib = fibo2(n-1) + fibo2(n-2) mem[n] = fib
the trouble seems to be at the double recursive call level ...
Check #21 pull request (closure implementation)
Check example Fibonacci -- 2: Recursive version with memoization https://github.com/epatrizio/ola/blob/main/examples/fibonacci.lua
Memoization does not work:
the trouble seems to be at the double recursive call level ...