-
-
Save simplay/722a5158222c477c4365 to your computer and use it in GitHub Desktop.
Higher order function examples.rb
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
# map two lists: e.g sum elementwise | |
[1,2,3].zip([4,5,6]).map{|a,b| a+b} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment