Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Created September 23, 2012 16:14
Show Gist options
  • Select an option

  • Save edipofederle/3772174 to your computer and use it in GitHub Desktop.

Select an option

Save edipofederle/3772174 to your computer and use it in GitHub Desktop.
square.rb
array = [1.0,2.0,3.0]
puts a.collect {|num| num * num}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment