Run the given function over the given tree if it is a branch, else return the tree unchanged. This is like match where the onLeaf branch is set to identity.
onLeaf
identity
Underlying tree type.
Tree on which to run the given function.
A function from Branch to Tree.
The tree unchanged if it is a leaf, else the result of applying the given function on the branch.
Run the given function over the given tree if it is a branch, else return the tree unchanged. This is like match where the
onLeafbranch is set toidentity.Type Param: A
Underlying tree type.
Param: self
Tree on which to run the given function.
Param: f
A function from Branch to Tree.
Returns
The tree unchanged if it is a leaf, else the result of applying the given function on the branch.