Ruby - Functional Patterns in Ruby
Identify the error in this code:
lazy_enum = (1..5).lazy.select { |x| x.even? }.map { |x| x * 3 }
puts lazy_enum[2]lazy_enum = (1..5).lazy.select { |x| x.even? }.map { |x| x * 3 }
puts lazy_enum[2][].15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions