Sha256: ddcdb6a3e541b03a73081dc48600eb2f00628809fd72fa77a5402b6a13c2c771
Contents?: true
Size: 230 Bytes
Versions: 8
Compression:
Stored size: 230 Bytes
Contents
class Proc # sugar syntax for proc * operator # a = ->(x){x+1} # b = ->(x){x*10} # c = b*a # c.call(1) #=> 20 def *(other) Proc.new { |*args| self[*other[*args]] } end unless method_defined? :* end
Version data entries
8 entries across 8 versions & 2 rubygems