import { realHashSet } from "@tsplus/stdlib/collections/HashSet/_internal/hashSet" /** * Reduces the specified state over the values of the `HashSet`. * * @tsplus static HashSet.Aspects reduce * @tsplus pipeable HashSet reduce */ export function reduce(z: Z, f: (z: Z, v: V) => Z) { return (self: HashSet): Z => { realHashSet(self) return self._keyMap.reduceWithIndex(z, (z, v) => f(z, v)) } }