Skip to content

Instantly share code, notes, and snippets.

@thekarladam
Created November 6, 2010 17:28
Show Gist options
  • Save thekarladam/665555 to your computer and use it in GitHub Desktop.
Save thekarladam/665555 to your computer and use it in GitHub Desktop.
puts ((1..100).map {|n| n**2}).inject{|sum, n| sum += n}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment