Lazy
a = [1,2,3,4,2,5].lazy.map { |x| x * 10 }.select { |x| x > 30 } #=> no evaluation and creations of arrays
a.to_a #=> [40, 50], evaluation performed - no intermediate arrays generated.
Eager
a = [1,2,3,4,2,5].map { |x| x * 10 }.select { |x| x > 30 } #=> intermediate arrays generated