From: Caleb Clausen Date: 2006-07-21T10:08:51+09:00 Subject: Re: Using .each with constructors On 7/20/06, transfire@gmail.com wrote: > class Proc > def *(i) > a = [] > i.times{ a << call } > a > end > end > > lambda{ Object.new } * 3 > > Which is pretty versitle. Unforunately I already have Proc#* tied up > with function composition. There's no conflict: class Proc def *(x) if Integer===x (0...x).map{call} else #...compose procs proc{|*args| self[x[*args]]} end end end