Skip to content

Instantly share code, notes, and snippets.

/map.rb Secret

Created February 5, 2015 16:56
Show Gist options
  • Save anonymous/fb723016dc441628ec67 to your computer and use it in GitHub Desktop.
Save anonymous/fb723016dc441628ec67 to your computer and use it in GitHub Desktop.
Ruby Map Practice
[1, 2, 3].map { |n| __ } == [2, 3, 4]
[1, 2, 3].map { |n| __ } == [41, 42, 43]
[1, 2, 3].map { |n| __ } == [10, 20, 30]
[1, 2, 3].map { |n| __ } == ['1', '2', '3']
[1, 2, 3].map { |n| __ } == ['2', '3', '4']
[1, 2, 3].map { |n| __ } == ['1 one-thousand', '2 one-thousand', '3 one-thousand']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment