Ruby - Functional Patterns in Ruby
What will be the output of this Ruby code?
p1 = Proc.new { |n| n * 4 }
p2 = Proc.new { |m| m - 1 }
p3 = p1 >> p2
puts p3.call(2)p1 = Proc.new { |n| n * 4 }
p2 = Proc.new { |m| m - 1 }
p3 = p1 >> p2
puts p3.call(2)15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions