We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As someone who writes Ruby regularly, I felt your fib(n) seemed awkward.
fib(n)
fib(n) n < 2 ? n : fib(n-1) + fib(n-2) end alias :fibonacci :fib
I think that example is true to the ruby style as well as true to your argument.
The text was updated successfully, but these errors were encountered:
Looks good. Want to issue a PR?
Sorry, something went wrong.
No branches or pull requests
As someone who writes Ruby regularly, I felt your
fib(n)
seemed awkward.I think that example is true to the ruby style as well as true to your argument.
The text was updated successfully, but these errors were encountered: