Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Perl 6 coroutines (RFC 31)

by John M. Dlugosz (Monsignor)
on Jul 13, 2001 at 18:56 UTC ( #96422=note: print w/replies, xml ) Need Help??


in reply to Re: Perl 6 coroutines (RFC 31)
in thread Perl 6 coroutines (RFC 31)

I see... I thought about wrapping the iterator in a closure, but that won't help. It would work if yeild was called from the closure's block (not from a reusable helper function).

My example means that my loop is calling next_inorder() to loop. It does not wait for next_inorder() to return undef, but breaks out of the loop when it sees the element it's looking for. next_inorder yields. Caller want's to quit early. Get it?

—John

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://96422]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2020-10-29 22:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (274 votes). Check out past polls.

    Notices?