/** * Reduce a state over the map entries. * * @tsplus static RedBlackTree.Aspects reduce * @tsplus pipeable RedBlackTree reduce */ export function reduce(z: Z, f: (z: Z, v: V) => Z) { return (self: RedBlackTree): Z => self.reduceWithIndex(z, (z1, _, v) => f(z1, v)) }