DISQUS

Dan Manges's Blog: Dan Manges - Fibonacci Code Golf

  • Josh · 2 years ago
    Unbelievable, you have comments now.
  • Dan Manges · 2 years ago
    Yeah, this Disqus service is cool. My blog is still just plain HTML (generated from a Rails app), but I can have comments. The other service I found to do something similar is http://js-kit.com/, but Disqus looked better for what I want.
  • s · 1 year ago
    def fibonacci1(number)
    x=y=1;(number-2).times{x,y=y,x+y};y
    end

    how on earth this is working?
  • Dan Manges · 1 year ago
    Ruby supports parallel assignment for the implementation inside the block. The return value is the value of the last statement evaluated in the method, so to return the value of y, you just need to put "y"