Skip to content

Instantly share code, notes, and snippets.

@iamjarvo
Created September 4, 2012 21:04
Show Gist options
  • Save iamjarvo/b34d392ed11428684031 to your computer and use it in GitHub Desktop.
Save iamjarvo/b34d392ed11428684031 to your computer and use it in GitHub Desktop.
def fibonacci(n)
if n == 0 or n == 1
1
else
fibonacci(n - 1) + fibonacci(n + 2)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment