Sha256: 1b2e16b7e7bed32e87ad8e9db907b995685d1a461590c76edaab651ac5bf8610

Contents?: true

Size: 166 Bytes

Versions: 17

Compression:

Stored size: 166 Bytes

Contents

require 'abstractivator/enumerator_ext'

module Numbers
  def from(n, increment=1)
    Enumerator.unfold(n) { |nxt| [nxt, nxt + increment] }
  end

  extend self
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
abstractivator-0.20.0 lib/abstractivator/numbers.rb
abstractivator-0.19.0 lib/abstractivator/numbers.rb
abstractivator-0.18.0 lib/abstractivator/numbers.rb
abstractivator-0.17.0 lib/abstractivator/numbers.rb
abstractivator-0.16.0 lib/abstractivator/numbers.rb
abstractivator-0.15.0 lib/abstractivator/numbers.rb
abstractivator-0.14.0 lib/abstractivator/numbers.rb
abstractivator-0.13.0 lib/abstractivator/numbers.rb
abstractivator-0.12.0 lib/abstractivator/numbers.rb
abstractivator-0.11.0 lib/abstractivator/numbers.rb
abstractivator-0.10.0 lib/abstractivator/numbers.rb
abstractivator-0.8.0 lib/abstractivator/numbers.rb
abstractivator-0.7.0 lib/abstractivator/numbers.rb
abstractivator-0.6.0 lib/abstractivator/numbers.rb
abstractivator-0.5.0 lib/abstractivator/numbers.rb
abstractivator-0.4.1 lib/abstractivator/numbers.rb
abstractivator-0.4.0 lib/abstractivator/numbers.rb