Created
May 11, 2019 13:04
-
-
Save stevencch99/86950f4c4e4fef4375e4a88f6f1d1e70 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
double = lambda { |number| number * 2 } | |
double = -> (number) { return number * 2 } | |
double[2] # => 4 | |
double[2, 3] # => ArgumentError (wrong number of arguments (given 2, expected 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment