Larry Wall wrote:

On Thu, Mar 17, 2005 at 11:02:47AM +0100, Juerd wrote:

: No, as that'd break the most common idiom it introduced: use of an array
: with 1..Inf, as in the example you're replying to, but also
: : for @foos 1... -> $foo, $i { ... }

Maybe we need a short-circuit zip:

for @foos 1... -> $foo, $i { ... }

Or maybe that idiom should be written as:

 for @foos.kv -> $i, $foo { ... }

But that gets a bit shaky beyond the shortest case. For instance, there's no easy way to simulate:

 for 1...  @foos  @bars {...}

So I'll add a C<Bit +$shortest> to C<zip>, and leave it up to you to determine what the operator form of it should be, if any.

 for zip :shortest 1...; @foos; @bars {...}

-- Rod Adams

Reply via email to