Skip to content

Instantly share code, notes, and snippets.

@cantin
Created November 8, 2012 09:55
Show Gist options
  • Save cantin/4037877 to your computer and use it in GitHub Desktop.
Save cantin/4037877 to your computer and use it in GitHub Desktop.
lambda default params
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