Sha256: 62c01aec2d1a9fe22de5f906ef56c033a123db9ce55ca1c16229501ef5bb479d
Contents?: true
Size: 409 Bytes
Versions: 14
Compression:
Stored size: 409 Bytes
Contents
class Proc # TODO: missing traversal of chain # create a chain of proc. whenever you call the chain, # each proc would be called. the return value would be # all the results saved orderly in a array. def chain *procs, &block procs << block if block lambda{ |*args| result = [] ([self] + procs).each{ |i| result += [i[*args]].flatten } result } end end
Version data entries
14 entries across 14 versions & 2 rubygems