My code is also a stateful iterator that is very conscious of RAM usage. This is why I pointed it to you. The name Tree::Fast is more that it's the leanest implementation of a tree in Perl that I could find.

My criteria for good software:

Does it work?

Can someone else come in, make a change, and be reasonably certain no bugs were introduced?