Module: Scaruby::Function

Included in:
AppliableProc
Defined in:
lib/scaruby/function.rb

Instance Method Summary collapse

Instance Method Details

#and_then(g) ⇒ Object



12
13
14
# File 'lib/scaruby/function.rb', line 12

def and_then(g)
  Proc.new { |*args| g.call(self.call(*args)) }
end

#compose(g) ⇒ Object



8
9
10
# File 'lib/scaruby/function.rb', line 8

def compose(g)
  Proc.new { |*args| self.call(g.call(*args)) }
end