Skip to content

Instantly share code, notes, and snippets.

@jjuliano
Last active December 16, 2019 11:01
Show Gist options
  • Save jjuliano/d27cd8f234fdc7804067a0f82030ce9a to your computer and use it in GitHub Desktop.
Save jjuliano/d27cd8f234fdc7804067a0f82030ce9a to your computer and use it in GitHub Desktop.
(1..4).collect {|i| i*i } #=> [1, 4, 9, 16]
(1..4).collect { "cat" } #=> ["cat", "cat", "cat", "cat"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment