Yield from function?
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jan 30 10:48:10 PST 2017
On 01/30/2017 03:03 AM, Profile Anaysis wrote:
> I need to yield from a complex recursive function too allow visualizing
> what it is doing.
>
> e.g., if it is a tree searching algorithm, I'd like to yield for each
> node so that the current state can be shown visually.
I used tree iteration as a Generator example here:
http://ddili.org/ders/d.en/fibers.html
It's in the code where the function 'byNode' appears. (The example
builds on an earlier tree iteration code in the same chapter.)
Ali
More information about the Digitalmars-d-learn
mailing list