Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyProc vs lambda usageSingle-choice MCQ

How does a non-explicit return interact with proc vs lambda when each is built and called inside a method?

def lambda_return l = lambda { return 10 } l.call 20 end def proc_return p = Proc.new { return 10 } p.call 20 end # lambda_return => ? proc_return => ?