From: transfire@... Date: 2006-07-21T10:18:12+09:00 Subject: Re: Using .each with constructors Caleb Clausen wrote: > 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 Nice. I'll use that. Thanks! T.