Skip to content

Instantly share code, notes, and snippets.

@arn-e
Created October 29, 2012 00:42
Show Gist options
  • Select an option

  • Save arn-e/3970723 to your computer and use it in GitHub Desktop.

Select an option

Save arn-e/3970723 to your computer and use it in GitHub Desktop.
fibonacci_sequence
def fb?(i,a=0,b=1)
b>i ?false:(b==i ?true:fb?(i,b,a+b))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment