reduce_tree(f,
parent_unit_node,
unit_node,
get_children,
*state)
| source code
|
Enumerate a tree, applying f to in a pre-order fashion to each
node.
parent_unit_node contains the parent of unit_node. For the root of the
tree, parent_unit_node == unit_node.
get_children is a single argument function applied to a unit_node to
get a list/iterator to its children.
state is used by f to modify state information relating to whatever f
does to the tree.
- Decorators:
@accepts(IsCallable(), Any(), Any(), IsCallable(), state= [Any()])
|