Class: Enumerator

Inherits:
Object
  • Object
show all
Defined in:
lib/five_leaves/lazy_enum.rb

Instance Method Summary collapse

Instance Method Details

#lazy_zip(with) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/five_leaves/lazy_enum.rb', line 20

def lazy_zip(with)
  Enumerator.new do |yielder|
    loop do
      yielder << [self.next, with.next]
    end
  end
end