import * as Chunk from "@effect-ts/system/Collections/Immutable/Chunk"; import * as Tp from "@effect-ts/system/Collections/Immutable/Tuple"; import type { Predicate } from "@effect-ts/system/Function"; import type { Either } from "../../../Either/index.js"; import type { Equal } from "../../../Equal/index.js"; import type { Identity } from "../../../Identity/index.js"; import type { ChunkURI } from "../../../Modules/index.js"; import * as Ord from "../../../Ord/index.js"; import type { URI } from "../../../Prelude/index.js"; import * as P from "../../../Prelude/index.js"; import type { Show } from "../../../Show/index.js"; import type { PredicateWithIndex } from "../../../Utils/index.js"; export * from "@effect-ts/system/Collections/Immutable/Chunk"; /** * `ForEachWithIndex`'s `forEachWithIndexF` function */ export declare const forEachWithIndexF: P.ForEachWithIndexFn<[URI<"Chunk", {}>], P.Auto>; /** * `ForEach`'s `forEachF` function */ export declare const forEachF: P.ForeachFn<[URI<"Chunk", {}>], P.Auto>; /** * `ForEach`'s `forEachF` function */ export declare const forEachF_: P.ForeachFn_<[URI]>; /** * `Wilt`'s `separateF` function */ export declare const separateF: P.Wilt<[URI<"Chunk", {}>], P.Auto>; /** * `Wilt`'s `separateF` function */ export declare const separateWithIndexF: P.WiltWithIndex<[URI<"Chunk", {}>], P.Auto>; /** * `Wither`'s `compactF` function */ export declare const compactF: P.Wither<[URI<"Chunk", {}>], P.Auto>; /** * `WitherWithIndex`'s `compactWithIndexF` function */ export declare const compactWithIndexF: P.WitherWithIndex<[URI<"Chunk", {}>], P.Auto>; /** * Test if a value is a member of an array. Takes a `Equal` as a single * argument which returns the function to use to search for a value of type `A` in * an array of type `Chunk`. * * @ets_data_first elem_ */ export declare function elem(E: Equal, a: A): (as: Chunk.Chunk) => boolean; /** * Test if a value is a member of an array. Takes a `Equal` as a single * argument which returns the function to use to search for a value of type `A` in * an array of type `Chunk`. */ export declare function elem_(as: Chunk.Chunk, E: Equal, a: A): boolean; /** * Creates an array of array values not included in the other given array using a `Equal` for equality * comparisons. The order and references of result values are determined by the first array. */ export declare function difference_(xs: Chunk.Chunk, E: Equal, ys: Chunk.Chunk): Chunk.Chunk; /** * Creates an array of array values not included in the other given array using a `Equal` for equality * comparisons. The order and references of result values are determined by the first array. * * @ets_data_first difference_ */ export declare function difference(E: Equal, ys: Chunk.Chunk): (xs: Chunk.Chunk) => Chunk.Chunk; /** * Derives an `Equal` over the `Chunk` of a given element type from the `Equal` of that type. The derived `Equal` defines two * arrays as equal if all elements of both arrays are compared equal pairwise with the given `E`. In case of arrays of * different lengths, the result is non equality. */ export declare function getEqual(E: Equal): Equal>; /** * Returns a `Identity` for `Chunk` */ export declare function getIdentity(): Identity>; /** * Returns a `Ord` for `Chunk` given `Ord` */ export declare function getOrd(O: Ord.Ord): Ord.Ord>; /** * Returns a `Show` for `Chunk` given `Show` */ export declare function getShow(S: Show): Show>; /** * Creates an array of unique values that are included in all given arrays using a `Eq` for equality * comparisons. The order and references of result values are determined by the first array. */ export declare function intersection_(xs: Chunk.Chunk, E: Equal, ys: Chunk.Chunk): Chunk.Chunk; /** * Creates an array of unique values that are included in all given arrays using a `Eq` for equality * comparisons. The order and references of result values are determined by the first array. * * @ets_data_first intersection_ */ export declare function intersection(E: Equal, ys: Chunk.Chunk): (xs: Chunk.Chunk) => Chunk.Chunk; /** * Fold Identity with a mapping function */ export declare function foldMap(M: Identity): (f: (a: A) => M) => (fa: Chunk.Chunk) => M; /** * Fold Identity with a mapping function */ export declare function foldMap_(fa: Chunk.Chunk, M: Identity, f: (a: A) => M): M; /** * Fold Identity with a mapping function that consider also the index */ export declare function foldMapWithIndex(M: Identity): (f: (i: number, a: A) => M) => (fa: Chunk.Chunk) => M; /** * Fold Identity with a mapping function that consider also the index */ export declare function foldMapWithIndex_(fa: Chunk.Chunk, M: Identity, f: (i: number, a: A) => M): M; /** * Sort the elements of an array in increasing order * * @ets_data_first sort_ */ export declare function sort(O: Ord.Ord): (as: Chunk.Chunk) => Chunk.Chunk; /** * Sort the elements of an array in increasing order */ export declare function sort_(as: Chunk.Chunk, O: Ord.Ord): Chunk.Chunk; /** * Sort the elements of an array in increasing order, where elements are compared using first `ords[0]`, * then `ords[1]`, then `ords[2]`, etc... * * @ets_data_first sortBy_ */ export declare function sortBy(ords: Array>): (as: Chunk.Chunk) => Chunk.Chunk; /** * Sort the elements of an array in increasing order, where elements are compared using first `ords[0]`, * then `ords[1]`, then `ords[2]`, etc... */ export declare function sortBy_(as: Chunk.Chunk, ords: Array>): Chunk.Chunk; /** * Creates an array of unique values, in order, from all given arrays using a `Equal` for equality comparisons */ export declare function union_(xs: Chunk.Chunk, E: Equal, ys: Chunk.Chunk): Chunk.Chunk; /** * Creates an array of unique values, in order, from all given arrays using a `Equal` for equality comparisons * * @ets_data_first union_ */ export declare function union(E: Equal, ys: Chunk.Chunk): (xs: Chunk.Chunk) => Chunk.Chunk; /** * Remove duplicates from an array, keeping the first occurrence of an element. */ export declare function uniq_(as: Chunk.Chunk, E: Equal): Chunk.Chunk; /** * Remove duplicates from an array, keeping the first occurrence of an element. * * @ets_data_first uniq_ */ export declare function uniq(E: Equal): (as: Chunk.Chunk) => Chunk.Chunk; /** * Separate elements based on a apredicate * * @ets_data_first partition_ */ export declare function partition(predicate: Predicate): (fa: Chunk.Chunk) => Tp.Tuple<[Chunk.Chunk, Chunk.Chunk]>; /** * Separate elements based on a apredicate */ export declare function partition_(fa: Chunk.Chunk, predicate: Predicate): Tp.Tuple<[Chunk.Chunk, Chunk.Chunk]>; /** * Separate elements based on a map function that also carry the index */ export declare function partitionMapWithIndex_(fa: Chunk.Chunk, f: (i: number, a: A) => Either): Tp.Tuple<[Chunk.Chunk, Chunk.Chunk]>; /** * Separate elements based on a map function that also carry the index * * @ets_data_first partitionMapWithIndex_ */ export declare function partitionMapWithIndex(f: (i: number, a: A) => Either): (fa: Chunk.Chunk) => Tp.Tuple<[Chunk.Chunk, Chunk.Chunk]>; /** * Separate elements based on a predicate that also carry the index * * @ets_data_first partitionWithIndex */ export declare function partitionWithIndex(predicateWithIndex: PredicateWithIndex): (fa: Chunk.Chunk) => Tp.Tuple<[Chunk.Chunk, Chunk.Chunk]>; /** * Separate elements based on a predicate that also carry the index */ export declare function partitionWithIndex_(fa: Chunk.Chunk, predicateWithIndex: PredicateWithIndex): Tp.Tuple<[Chunk.Chunk, Chunk.Chunk]>; //# sourceMappingURL=operations.d.ts.map