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

What does `arr.map(&c.method(:double))` rely on, where `double` is an instance method of `c`?

class Calc def double(x); x * 2; end end c = Calc.new [1, 2, 3].map(&c.method(:double)) # => [2, 4, 6]