import * as tsplus_module_1 from "@effect/core/stream/Channel/operations/map";
import * as tsplus_module_2 from "@effect/core/stream/Channel/operations/flatMap";
/**
 * Returns a new channel that is the sequential composition of this channel
 * and the specified channel. The returned channel terminates with the result
 * of calling the specified function on the terminal values of both channels.
 *
 * @tsplus fluent ets/Channel zipWith
 */

export function zipWith_(self, that, f) {
  return tsplus_module_2.flatMap_(self, a => tsplus_module_1.map_(that(), b => f(a, b)));
}
/**
 * Returns a new channel that is the sequential composition of this channel
 * and the specified channel. The returned channel terminates with the result
 * of calling the specified function on the terminal values of both channels.
 *
 * @tsplus static ets/Channel/Aspects zipWith
 */

export const zipWith = (that, f) => self => zipWith_(self, that, f);
//# sourceMappingURL=zipWith.mjs.map