Skip to content

Instantly share code, notes, and snippets.

@radar
Created August 9, 2018 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radar/328f0b1d126e6b3123387a73e85d9500 to your computer and use it in GitHub Desktop.
Save radar/328f0b1d126e6b3123387a73e85d9500 to your computer and use it in GitHub Desktop.
[1,2,3,4,5].each_with_index.each_with_object([]) do |(e, i), a|
a << e * i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment