Ruby - Functional Patterns in Ruby
Which of the following is the correct syntax to compose two Procs
p1 and p2 in Ruby?p1 and p2 in Ruby?>>, which is written as >> but in Ruby code it is >> (two greater-than signs).>> correctly. combined = p1 >>> p2 uses three > which is invalid. combined = p1 << p2 uses << which is not for composition. combined = p1 >> p2.call calls p2 immediately, which is wrong.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions