Sha256: 032e6cd4e3a7adf0d3e674e53d632478ddab5ec0ba9446fa2a7086d9778c3c0e

Contents?: true

Size: 300 Bytes

Versions: 6

Compression:

Stored size: 300 Bytes

Contents

module Yaks
  module FP
    extend self

    def curry_method(name)
      method(name).to_proc.curry
    end

    def identity_function
      ->(x) {x}
    end
    I = identity_function

    def send_with_args(symbol, *args, &blk)
      ->(obj) { obj.method(symbol).(*args, &blk) }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yaks-0.4.4 lib/yaks/fp.rb
yaks-0.4.3 lib/yaks/fp.rb
yaks-0.4.2 lib/yaks/fp.rb
yaks-0.4.1 lib/yaks/fp.rb
yaks-0.4.0 lib/yaks/fp.rb
yaks-0.4.0.rc1 lib/yaks/fp.rb