loading...

re: Fibonacci sequence with Python recursion and memoization VIEW POST

FULL DISCUSSION
 

Good post! 🙂👍

func fib(n: int): int =
  if n < 2: n else: fib(n - 1) + fib(n - 2)

echo fib(9)

Nim lang version.

Code of Conduct Report abuse