import * as tsplus_module_1 from "@tsplus/stdlib/data/Tuple/make";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/mapAccum";
/**
 * Zips this stream together with the index of elements.
 *
 * @tsplus fluent ets/Stream zipWithIndex
 */

export function zipWithIndex_(self, __tsplusTrace) {
  return tsplus_module_2.mapAccum_(self, () => 0, (index, a) => tsplus_module_1.make(index + 1, tsplus_module_1.make(a, index)), __tsplusTrace);
}
//# sourceMappingURL=zipWithIndex.mjs.map