Skip to content

Instantly share code, notes, and snippets.

@migrs
Created August 31, 2010 09:01
Show Gist options
  • Save migrs/558762 to your computer and use it in GitHub Desktop.
Save migrs/558762 to your computer and use it in GitHub Desktop.
fib = Hash.new {|h,k| h[k] = k < 2 ? 1 : h[k-2] + h[k-1]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment