// ets_tracing: off import type * as Tp from "../../../Collections/Immutable/Tuple/index.js" import { identity } from "../../../Function/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 ZipAllSortedByKeyWith from "./zipAllSortedByKeyWith.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. Keeps only values from this stream, using the * specified value `default` to fill in missing values. * * 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 zipAllSortedByKeyLeft_( self: C.SortedByKey, that: S.Stream>, default_: A, ord: OD.Ord ): S.Stream> { return ZipAllSortedByKeyWith.zipAllSortedByKeyWith_( self, that, identity, (_) => default_, (a, _) => a, ord ) } /** * 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. Keeps only values from this stream, using the * specified value `default` to fill in missing values. * * 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 zipAllSortedByKeyLeft_ */ export function zipAllSortedByKeyLeft( that: S.Stream>, default_: A, ord: OD.Ord ) { return (self: C.SortedByKey) => zipAllSortedByKeyLeft_(self, that, default_, ord) }