Skip to content

Instantly share code, notes, and snippets.

@xladimir
Created July 30, 2013 01:51
Show Gist options
  • Select an option

  • Save xladimir/6109553 to your computer and use it in GitHub Desktop.

Select an option

Save xladimir/6109553 to your computer and use it in GitHub Desktop.
# 2013-07-29
(0..9).reduce([]) { |sum, n| sum.push *[10-n]*(n+1) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment