This was basically a subset of visitor pattern. Note here that this is not specific to tree data structure alone. A little thought would make it clear that this can be applied to any iterator for any kind of structure. And this is also not restricted by the nodes that form your structure. The case we discussed above was for homogeneous data structures.
Visitor pattern works equally well with a heterogeneous data structure.
And herein lies the true power of this pattern. Now let's see what changes will have to be made if this design is to work with such a structure. This node can access only the part of operation pertaining to itself. Instead of confusing anymore, I will take you to some code. So you see, traversal algorithms remain independent of the nodes and operations.