Ruby - Functional Patterns in Ruby
Which method chain correctly creates a lazy enumerator that selects even numbers from 1 to 10?
.lazy first creates a lazy enumerator, then .select(&:even?) filters even numbers lazily..lazy after filtering or mapping, which returns an Enumerator but not lazy from the start. (1..10).lazy.map(&:even?) maps to booleans, not selects even numbers.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions