Sha256: 5cb46ea04cb2d66be1df431c69910e9eb14b96b64f472d55d99650f6330b74ad

Contents?: true

Size: 350 Bytes

Versions: 3

Compression:

Stored size: 350 Bytes

Contents

begin
  require 'enumerator' #if RUBY_VERSION < 1.9
  # for Ruby 1.8 -> 1.9 transition
  Enumerator = Enumerable::Enumerator unless defined? ::Enumerator
rescue LoadError # Ruby 1.9 already has it built-in.
end

require 'facets/functor'

class Enumerator

  #
  def fx
    Functor.new do |op, *a|
      each{ |e| e.send(op, *a) }
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/enumerator/fx.rb
facets-2.8.3 lib/core/facets/enumerator/fx.rb
facets-2.8.2 lib/core/facets/enumerator/fx.rb