import * as tsplus_module_1 from "@effect/core/stream/Stream/operations/map";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/flatMap";
/**
 * Composes this stream with the specified stream to create a cartesian
 * product of elements with a specified function. The `that` stream would be
 * run multiple times, for every element in the `this` stream.
 *
 * See also `Stream.zip` for the more common point-wise variant.
 *
 * @tsplus fluent ets/Stream crossWith
 */

export function crossWith_(self, that, f, __tsplusTrace) {
  return tsplus_module_2.flatMap_(self, a => tsplus_module_1.map_(that(), b => f(a, b), __tsplusTrace), __tsplusTrace);
}
/**
 * Composes this stream with the specified stream to create a cartesian
 * product of elements with a specified function. The `that` stream would be
 * run multiple times, for every element in the `this` stream.
 *
 * See also `Stream.zip` for the more common point-wise variant.
 *
 * @tsplus static ets/Stream/Aspects crossWith
 */

export const crossWith = (that, f, __tsplusTrace) => self => crossWith_(self, that, f, __tsplusTrace);
//# sourceMappingURL=crossWith.mjs.map