proc and lambda in Ruby – Introduction
Today we are going to talk a little bit about the infamous procs and lambdas in Ruby and the differences between them. Well, you may already know that a proc
and a lambda
are objects of the same class:
p, l = proc{}, lambda{} p.class #=> Proc l.class #=> Proc
So is
proc
an alias for lambda
? Continue reading