3 ms·
Where did you find the Nim example? It's by far the strangest fibonacci implementation I have seen (and I am a Nim developer). Anyway, I translated the Go exam
by dom96 9y ago
Where did you find the Nim example? It's by far the strangest fibonacci implementation I have seen (and I am a Nim developer).
Anyway, I translated the Go example to Nim for a better comparison:
proc fib(a: int): int =
if a < 2:
return a
return fib(a - 1) + fib(a - 2)