/** * @tsplus static SortedMap.Aspects mapWithIndex * @tsplus pipeable SortedMap mapWithIndex */ export function mapWithIndex(f: (k: K, v: V) => A) { return (self: SortedMap): SortedMap => self.reduceWithIndex(SortedMap.empty(self.getOrd), (b, k, v) => b.set(k, f(k, v))) }