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

Given a proc and a lambda that both take two parameters, what is the result of calling each with a single array argument?

pr = proc { |a, b| "#{a}-#{b}" } la = lambda { |a, b| "#{a}-#{b}" } pr.call([1, 2]) # ? la.call([1, 2]) # ?