(no title)
smallnamespace | 10 months ago
For example if you literally don’t care about the order then your code can map over a default iterator that is efficient (DFS).
smallnamespace | 10 months ago
For example if you literally don’t care about the order then your code can map over a default iterator that is efficient (DFS).
naasking|10 months ago
alterom|10 months ago
Then, for some cases, depth-first traversal is needed; for others, breadth-first.
Then, there's parallelism, and even the plain old for loops aren't parallel by default.
By the time you specify exactly what you need from a tree traversal, you've written code to do it.
And if you're fine with some default choice — you already can use the default iterator with the for_each loop.
I don't see what need there is for adding an extra for_tree syntax to do that.