Skip to content

Instantly share code, notes, and snippets.

@randallreedjr
Created March 6, 2016 22:38
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 randallreedjr/c94e1c313218a2515dc4 to your computer and use it in GitHub Desktop.
Save randallreedjr/c94e1c313218a2515dc4 to your computer and use it in GitHub Desktop.
Sixth code sample for post Ruby Abstraction in Loops
def square_array(array)
array.collect {|element| element**2}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment