class Proc

Require ‘beethoven/proc` to monkey patch Proc with these composition helpers.

Public Instance Methods

*(other) click to toggle source
# File lib/beethoven/proc.rb, line 3
def *(other)
  -> x { call(other.call(x)) }
end
|(other) click to toggle source
# File lib/beethoven/proc.rb, line 7
def |(other)
  -> x { other.call(call(x)) }
end