Ruby - Functional Patterns in Ruby
You want to compose three Procs:
Which expression correctly composes them so the input is first processed by
p1 = Proc.new { |x| x + 1 }
p2 = Proc.new { |y| y * 2 }
p3 = Proc.new { |z| z - 3 }Which expression correctly composes them so the input is first processed by
p1, then p2, then p3?