in reply to Re^3: An iterator for (not "iterating") a recursive data structure.
in thread An iterator for (not "iterating") a recursive data structure.

> Perl 6's lazy lists can be used in a similar way according to its faq

search for "gather / take"

edit

> which is to throw an exception at the end of the iteration rather than try to return a specific value

you can use goto for a poor man's solution here.

Cheers Rolf

PS: Je suis Charlie!

  • Comment on Re^4: An iterator for (not "iterating") a recursive data structure.