/** * Maps over the entries of the `HashMap` using the specified function. * * @tsplus static HashMap.Aspects mapWithIndex * @tsplus pipeable HashMap mapWithIndex */ export function mapWithIndex(f: (k: K, v: V) => A) { return (self: HashMap): HashMap => self.reduceWithIndex(HashMap.empty(), (z, k, v) => z.set(k, f(k, v))) }