/** * Reduces the specified state over the entries of the `ImmutableMap`. * * @tsplus static ImmutableMap.Aspects reduceWithIndex * @tsplus pipeable ImmutableMap reduceWithIndex */ export function reduceWithIndex(z: Z, f: (z: Z, k: K, v: V) => Z) { return (self: ImmutableMap): Z => { let s = z self.internalMap.forEach((v, k) => { s = f(s, k, v) }) return s } }