Skip to content

Instantly share code, notes, and snippets.

@beezeebly
Created December 29, 2013 19:51
Show Gist options
  • Save beezeebly/8174088 to your computer and use it in GitHub Desktop.
Save beezeebly/8174088 to your computer and use it in GitHub Desktop.
Ruby array map method example
evens = [2, 4, 6, 8]
evens.map { |even| even*2 }
# => [4, 8, 12, 16]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment