Function adapton::catalog::collections::monoid_of_tree
[−]
[src]
pub fn monoid_of_tree<Lev: Level, X: Debug + Eq + Hash + Clone + 'static, Te: TreeElim<Lev, X> + 'static>(
tree: Te,
id_elm: X,
bin_op: Rc<Fn(X, X) -> X>
) -> X
Aggregates the leaf elements of a tree using a user-defined
monoid. The monoid consists of an identity element id_elm
and
binary operation over leaf values bin_op
.
Derived from tree_fold_up
.