in reply to Eliminating Recursive Tree Walking by using MJD-style Infinite Streams?
Turning that into an iterator sounds like an interesting task, but it's hard to do without having code that actually runs. So your best bet for getting a complete solution is to provide a complete script that constructs such a tree structure, runs the sub against it, and compares the output to the desired result, preferably using Test::More or something along these lines.
I will be offline for a few days, if nobody else answers in the meantime I'll do it ;-)
If you just want to return some results from a sub and then continue running that sub, you can take a look at Coro, which allows you to do just that (or, to advertise my own modules, Perl6::GatherTake, which is just a nice wrapper around some Coro functions).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Eliminating Recursive Tree Walking by using MJD-style Infinite Streams?
by jryan (Vicar) on Jun 16, 2008 at 21:53 UTC | |
by Anonymous Monk on Jun 17, 2008 at 06:12 UTC | |
by moritz (Cardinal) on Jun 19, 2008 at 11:25 UTC |
In Section
Seekers of Perl Wisdom