Sha256: 011ce92911c58d1e17fea18097bab223e9bbe212c99aae4d9d3ebef7342d387f

Contents?: true

Size: 122 Bytes

Versions: 48

Compression:

Stored size: 122 Bytes

Contents

fib = Enumerator.new do |y|
  a = b = 1
  10.times do
    y << a
    a, b = b, a + b
  end
end

fib.each do |e|
  p e
end

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
rack-app-7.3.2 spike/enum.rb
rack-app-7.3.1 spike/enum.rb
rack-app-7.3.0 spike/enum.rb
rack-app-7.2.2 spike/enum.rb
rack-app-7.2.1 spike/enum.rb
rack-app-7.2.0 spike/enum.rb
rack-app-7.1.0 spike/enum.rb
rack-app-7.0.0 spike/enum.rb
rack-app-6.8.0 spike/enum.rb
rack-app-6.7.1 spike/enum.rb
rack-app-6.7.0 spike/enum.rb
rack-app-6.6.0 spike/enum.rb
rack-app-6.5.0 spike/enum.rb
rack-app-6.4.1 spike/enum.rb
rack-app-6.4.0 spike/enum.rb
rack-app-6.3.3 spike/enum.rb
rack-app-6.3.2 spike/enum.rb
rack-app-6.3.1 spike/enum.rb
rack-app-6.3.0 spike/enum.rb
rack-app-6.2.0 spike/enum.rb