Created
November 8, 2012 09:55
-
-
Save cantin/4037877 to your computer and use it in GitHub Desktop.
lambda default params
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
f = lambda {|x, y=1| puts(x+y) } | |
f = ->(x, y =1) { puts(x+y) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment