Aggregate: Traverse a Tree and Perform Aggregation Operations
Description
The Aggregate method lets you set e.g. a value on the leafs, and then sum them up along the tree.
Usage
Aggregate(attribute, fun, ...)
Arguments
attribute
the attribute that is being called on every node. The attribute can be
field, a property or a method. If the node contains #' the attribute, its value is return.
Otherwise, fun(children$Aggregate(...)) is called. To use the Attribute method,