|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: Tree traversal without recursion: the tree as a state machineby dragonchild (Archbishop) |
| on Feb 16, 2007 at 17:21 UTC ( [id://600480]=note: print w/replies, xml ) | Need Help?? |
|
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:
In Section
Meditations
|
|
||||||||||||||||||||||||||||||