in reply to Tree traversal without recursion: the tree as a state machine
Tree implements an iterative callback for pre-order, post-order, and level-order traversals. If you call traverse() in scalar context, you'll be given a callback which will return the next node when invoked.
My criteria for good software:
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
In Section
Meditations