lib/core/facets/proc/compose.rb in facets-2.4.5 vs lib/core/facets/proc/compose.rb in facets-2.5.0

- old
+ new

@@ -7,11 +7,11 @@ # b = lambda { |y| y / 2 } # # a.compose(b).call(4) #=> 6 # b.compose(a).call(4) #=> 4 # - # CREDIT: Dave + # CREDIT: Dave def compose(g) raise ArgumentError, "arity count mismatch" unless arity == g.arity lambda{ |*a| self[ *g[*a] ] } end @@ -22,10 +22,10 @@ # b = lambda { |y| y / 2 } # # (a * b).call(4) #=> 6 # (b * a).call(4) #=> 4 # - # CREDIT: Dave + # CREDIT: Dave def *(x) if Integer===x # collect times c = []