in reply to An iterator for (not "iterating") a recursive data structure.
In order to avoid browsing the data structure from the root every time, you may want to keep a stack of pairs (reference, index) instead.