On 9/29/05, Dave Whipp <[EMAIL PROTECTED]> wrote:
>    for grep {defined} @in -> $item, ?$next {
>      print $item unless defined $next && $item eq $next;
>    }

This is an interesting idea.  Perhaps "for" (and "map") shift the
minimum arity of the block from the given list and bind the maximum
arity.  Of course, the minimum arity has to be >= 1 lest an infinite
loop occur.  But then perhaps you have another way to avoid integer
indices:

    for @list -> $this, [EMAIL PROTECTED] {
        ...
    }

As long as you don't look backwards.  Looking backwards makes problems
for GC in lazy contexts, so this might just be perfect.

Luke

Reply via email to