/** * Zips this stream together with the index of elements. * * @tsplus getter effect/core/stream/Stream zipWithIndex */ export function zipWithIndex(self: Stream): Stream { return self.mapAccum(0, (index, a) => [index + 1, [a, index] as const] as const) }