On 5/6/05, Larry Wall <[EMAIL PROTECTED]> wrote: > The question is whether to treat the left arg the same way we treat > attribute defaults, with one free closure call. We could say that > > { rand 10 } x 100 > { rand 10 } xx 100 > > should just automatically call the closure on the left repeatedly. In > the rare, rare case that you want to actually replicate a closure, you'd > have to say > > { { rand 10 } } x 100 > { { rand 10 } } xx 100
But we also have to remember that, given: my @codes = { { rand 10 } } xx 100; say @codes[0] == @codes[1]; # 0 You're not duplicating one closure as you are with: my @others = { rand 10 } xx 100; Without the closure semantics of xx. If you made @codes[0] do some role, it would only apply to @codes[0], but if you made @others[0] do some role, it would apply to every closure in @others. Luke