Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubylazy enumeratorsSingle-choice MCQ

What does `log` contain after this runs, illustrating how lazy chains process elements?

log = [] (1..3).lazy .map { |x| log << "m#{x}"; x } .map { |x| log << "n#{x}"; x } .to_a p log