Sha256: 1fcfd18b1578bcbb5cc1c846d6c81c6015596afeb3fce30d34a60db206ea912c
Contents?: true
Size: 338 Bytes
Versions: 11
Compression:
Stored size: 338 Bytes
Contents
module MPatch module Include module Proc # sugar syntax for proc * operator # a = ->(x){x+1} # b = ->(x){x*10} # c = b*a # c.call(1) #=> 20 def *(other) self.class.new { |*args| self[*other[*args]] } end end end require File.join 'mpatch','injector' end
Version data entries
11 entries across 11 versions & 1 rubygems