// ets_tracing: off import { identity } from "../../../../Function/index.js" import type * as C from "../core.js" import * as MergeWith from "./mergeWith.js" /** * Merges this stream and the specified stream together. * * New produced stream will terminate when both specified stream terminate if no termination * strategy is specified. */ export function merge_( self: C.Stream, that: C.Stream, strategy: MergeWith.TerminationStrategy = "Both" ): C.Stream { return MergeWith.mergeWith(self, that, identity, identity, strategy) } /** * Merges this stream and the specified stream together. * * New produced stream will terminate when both specified stream terminate if no termination * strategy is specified. * * @ets_data_first merge_ */ export function merge( that: C.Stream, strategy: MergeWith.TerminationStrategy = "Both" ) { return (self: C.Stream) => merge_(self, that, strategy) }