I have a simpler version: ```ruby # frozen_string_literal: true module Biz module Periods class Linear def initialize(periods, shifts, selector) @periods = periods.to_enum @shifts = shifts.to_enum @selector = selector @sequences = [@periods, @shifts] @inner_repr = Enumerator.new do |yielder| loop do @periods.next and next if @periods.peek.date == @shifts.peek.date yielder << begin sequences .public_send(selector) { |sequence| sequence.peek.date } .next end end loop do yielder << @periods.next end end end def to_a @periods.to_a @shifts.to_a @inner_repr.to_a end def method_missing(m, *args, &block) @inner_repr.send(m, *args, &block) end end end end ```