that why I love ruby (and functional languages in general)
def fibonacci(n)
a, b = 1, 1
n.times do
a, b = b, a + b
end
a
end
elegance beats ignorance (ruby vs. java)
that why I love ruby (and functional languages in general)
def fibonacci(n)
a, b = 1, 1
n.times do
a, b = b, a + b
end
a
end
elegance beats ignorance (ruby vs. java)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs