Context computed while recursing down the trees
Context computed while recursing down the trees
Result type computed at each tree
Result type computed at each tree
Combine the context with the results from subtrees
Combine the context with the results from subtrees
combine is used after recursively transforming the subtrees, to combine the multiple results into one result to use in the post operation. The order of the context is from left to right in the tree structure.
Combine is always invoked, even on a single element sublist or on an empty list. The tree argument is the current tree, before applying the recursive transformation. Same for the context argument, it is the current context at that transformation step. So combine can be used to apply some function to each tree element.
a post-transformation to be applied to the term
a post-transformation to be applied to the term
The term will be mapped after performing the recursion in the subtrees. This should only do the mapping, without any recursive call.
a pre-transformation to be applied to the term
a pre-transformation to be applied to the term
The term will be mapped before performing the recursion in the subtrees. This should only do the mapping, without any recursive call.