Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Tree traversal without recursion: the tree as a state machine

by dragonchild (Archbishop)
on Feb 16, 2007 at 17:21 UTC ( #600480=note: print w/replies, xml ) Need Help??


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:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: Tree traversal without recursion: the tree as a state machine

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://600480]
help
Chatterbox?
[karlgoethebier]: jedikaiti: did i ask already if you own a scope?
marto does the "it's almost home time" dance

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2017-07-21 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (328 votes). Check out past polls.