import * as tsplus_module_1 from "@tsplus/stdlib/data/Tuple/mergeTuple";
import * as tsplus_module_2 from "@effect/core/stream/Channel/operations/map";
import * as tsplus_module_3 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 a flattened
 * tuple of the terminal values of both channels.
 *
 * @tsplus operator ets/Channel +
 * @tsplus fluent ets/Channel zipFlatten
 */

export function zipFlatten_(self, that) {
  return tsplus_module_3.flatMap_(self, a => tsplus_module_2.map_(that(), b => tsplus_module_1.mergeTuple(a, b)));
}
/**
 * Returns a new channel that is the sequential composition of this channel
 * and the specified channel. The returned channel terminates with a flattend
 * tuple of the terminal values of both channels.
 *
 * @tsplus static ets/Channel/Aspects zipFlatten
 */

export const zipFlatten = that => self => zipFlatten_(self, that);
//# sourceMappingURL=zipFlatten.mjs.map