If pf
is defined for a given subtree, call super.
If pf
is defined for a given subtree, call super.traverse(pf(tree)),
otherwise super.traverse(tree).
Sets the tree's type to the result of the given function.
Sets the tree's type to the result of the given function. If the type is null, it remains null - the function is not called.
When you want to know a little more than the class, but a lot less than the whole tree.