Skip to content

Instantly share code, notes, and snippets.

@crossaidi
Created May 4, 2014 16:29
Show Gist options
  • Save crossaidi/11519468 to your computer and use it in GitHub Desktop.
Save crossaidi/11519468 to your computer and use it in GitHub Desktop.
Short reduce
numbers.map {|n| n*n}.reduce(:+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment