Class Proc
In: lib/facet/proc/to_method.rb
lib/facet/proc/compose.rb
Parent: Object

Methods

*   compose  

Constants

MethodMutexes = Hash.new do |hash, key| hash[key] = Mutex.new

Public Instance methods

*(other)

Alias for compose

Returns a new proc that is the functional compostion of two procs, in order.

 require 'facet/proc/compose'

 a = lambda { |x| x + 4 }
 b = lambda { |y| y / 2 }

 (a * b).call(4)  #=> 6
 (b * a).call(4)  #=> 4

[Validate]