Maps and reduces a map-based tree to a single value. See also Tree.reduce.
- The
valueFnwill be invoked to map individual leaf values in the tree. The signature of this function is(value, key, tree)(the same as for thevaluefunction inTree.map.). - For each level of the tree, the
reduceFnwill be called with the mapped values. Its signature is(values, keys, tree). The result of this function is used as the result of reducing this branch of the tree.