Created
March 6, 2016 22:38
-
-
Save randallreedjr/c94e1c313218a2515dc4 to your computer and use it in GitHub Desktop.
Sixth code sample for post Ruby Abstraction in Loops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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