On Wed, Jul 27, 2005 at 20:17:41 -0300, Flavio S. Glock wrote:
> I have an object representing the sequence "1..Inf".
> I tried creating a Coroutine, and then assigning the Coroutine to an
> Array, but it only yielded "1":
> 
>   my @a = $span.lazy;   # "1"
> 
> The coroutine worked fine in a "while" loop, but it didn't work in a "for" 
> loop.

I think unary = is what you want:

        my @a = $span.lazy;

        for [EMAIL PROTECTED] -> $item {
                ...
        }

Ofcourse, my @a = $span.lazy will have to be fixed, but what you
tried should be working.

-- 
 ()  Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418  perl hacker &
 /\  kung foo master: *shu*rik*en*sh*u*rik*en*s*hur*i*ke*n*: neeyah!!!!

Attachment: pgpK6nQnSPM5Y.pgp
Description: PGP signature

Reply via email to