Sha256: 51bc5bf62727a9bdab195e8fb2ce3d756fa7058d7feec4a3c9c6f238b893625d
Contents?: true
Size: 233 Bytes
Versions: 15
Compression:
Stored size: 233 Bytes
Contents
class Proc # function coposition # i.e., f compose g => f of g => f (g args) def compose *procs, &block procs << block if block lambda{ |*args| ([self] + procs).reverse.inject(args){ |val, fun| fun[*val] } } end end
Version data entries
15 entries across 15 versions & 2 rubygems