Re:Iterators? They still make these?
by RodgerTheGreat on Thursday June 17, 2010 @03:59PM
(#1440173)
Can you implement a tree traversal (in-order, post-order, your pick) in a traditional for loop without abusing the syntax?
[ Parent
| on HN ]
Sure you can, just list all your tree elements in an array, your iterator does that anyway. If done correctly it's 1 line extra code only.
And btw: let's not confuse implementation with syntax.