The code is in devel, in leoAttic.txt-->Abandoned projects-->script: iterative traverse.
I have added a few comments about what would be needed to complete the project, but I have no intention of doing so. The result would be slower and uglier than the code in leoAst.py.
For me, the work doesn't seem wasted. It shows just how useful generators are. The code in leoAst.py doesn't seem like the Hufflepuff way any more :-)
Edward