Skip to content

Instantly share code, notes, and snippets.

@oa414
Created September 28, 2012 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oa414/3800046 to your computer and use it in GitHub Desktop.
Save oa414/3800046 to your computer and use it in GitHub Desktop.
Ruby Fib Test
n = 9999999
def fib(n, x1, x2)
if n == 0
x1
else
fib(n - 1, x2, x1 + x2)
end
end
n.times{fib(40, 0, 1)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment