Skip to content

Instantly share code, notes, and snippets.

@def-
Created January 22, 2018 18:13
Show Gist options
  • Save def-/d57e784ce7578a07b3fe4b8790fc96fa to your computer and use it in GitHub Desktop.
Save def-/d57e784ce7578a07b3fe4b8790fc96fa to your computer and use it in GitHub Desktop.
proc fib(n: int): int =
if n <= 0: 1
else: fib(n-1) + fib(n-2)
static:
echo fib(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment