tree.foreach: Loops over nodes in the tree, applying a function using each node
as an argument. Optionally, either the leaves or internal nodes can
be dropped from the iteration.
Description
Loops over nodes in the tree, applying a function using
each node as an argument. Optionally, either the leaves
or internal nodes can be dropped from the iteration.