Skip to content

@myronmarston /proc_vs_lambda.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
>> p = Proc.new { |a, b| a }
=> #<Proc:0x00000001036962f8@(irb):2>
>> p.call(5)
=> 5
>> l = lambda { |a, b| a }
=> #<Proc:0x000000010368e8c8@(irb):4>
>> l.call(5)
ArgumentError: wrong number of arguments (1 for 2)
from (irb):4
from (irb):5:in `call'
from (irb):5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.