// ets_tracing: off import type * as Tp from "../../../Collections/Immutable/Tuple/index.js" import * as T from "../../../Effect/index.js" import type * as OD from "../../../Ord/index.js" import type * as S from "../_internal/core.js" import type * as C from "./core.js" import * as ZipAllSortedByKeyWithExec from "./zipAllSortedByKeyWithExec.js" /** * Zips this stream that is sorted by distinct keys and the specified * stream that is sorted by distinct keys to produce a new stream that is * sorted by distinct keys. Uses the functions `left`, `right`, and `both` * to handle the cases where a key and value exist in this stream, that * stream, or both streams. * * This allows zipping potentially unbounded streams of data by key in * constant space but the caller is responsible for ensuring that the * streams are sorted by distinct keys. */ export function zipAllSortedByKeyWith_( self: C.SortedByKey, that: C.SortedByKey, left: (a: A) => C1, right: (b: B) => C2, both: (a: A, b: B) => C3, ord: OD.Ord ): S.Stream> { return ZipAllSortedByKeyWithExec.zipAllSortedByKeyWithExec_( self, that, left, right, both, ord, T.parallel ) } /** * Zips this stream that is sorted by distinct keys and the specified * stream that is sorted by distinct keys to produce a new stream that is * sorted by distinct keys. Uses the functions `left`, `right`, and `both` * to handle the cases where a key and value exist in this stream, that * stream, or both streams. * * This allows zipping potentially unbounded streams of data by key in * constant space but the caller is responsible for ensuring that the * streams are sorted by distinct keys. * * @ets_data_first zipAllSortedByKeyWith_ */ export function zipAllSortedByKeyWith( that: C.SortedByKey, left: (a: A) => C1, right: (b: B) => C2, both: (a: A, b: B) => C3, ord: OD.Ord ) { return (self: C.SortedByKey) => zipAllSortedByKeyWith_(self, that, left, right, both, ord) }