import * as List from "@effect-ts/system/Collections/Immutable/List"; import type { Equal } from "../../../Equal/index.js"; import type { Identity } from "../../../Identity/index.js"; import type { 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"; export * from "@effect-ts/system/Collections/Immutable/List"; /** * `ForEach`'s `forEachF` function */ export declare const forEachF: P.ForeachFn<[URI<"List", {}>], P.Auto>; /** * Sort the given list by passing each value through the function and * comparing the resulting value. * * Performs a stable sort. * * @complexity O(n * log(n)) */ export declare function sortBy(O: Ord): (f: (a: A) => B) => (l: List.List) => List.List; /** * Sort the given list by passing each value through the function and * comparing the resulting value. * * Performs a stable sort. * * @complexity O(n * log(n)) */ export declare function sortBy_(O: Ord): (l: List.List, f: (a: A) => B) => List.List; /** * `Wiltable`'s `separateF` function */ export declare const separateF: P.Wilt<[URI<"List", {}>], P.Auto>; /** * `Wither`'s `compactF` function */ export declare const compactF: P.Wither<[URI<"List", {}>], 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 `Array`. */ export declare function elem(E: Equal): (a: A) => (as: List.List) => boolean; /** * Test if a value is a member of a list. Takes a `Equal` as a single * argument which returns the function to use to search for a value of type `A` in * an list of type `List`. */ export declare function elem_(E: Equal): (as: List.List, 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_(E: Equal): (xs: List.List, ys: List.List) => List.List; /** * 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(E: Equal): (ys: List.List) => (xs: List.List) => List.List; /** * Derives an `Equal` over the `Array` 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 `List` */ export declare function getIdentity(): Identity>; /** * Returns a `Show` for `Array` 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 list. */ export declare function intersection_(E: Equal): (xs: List.List, ys: List.List) => List.List; /** * 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(E: Equal): (ys: List.List) => (xs: List.List) => List.List; /** * Fold Identity with a mapping function that consider also the index */ export declare function foldMap_(M: Identity): (fa: List.List, f: (a: A) => M) => M; /** * Fold Identity with a mapping function that consider also the index */ export declare function foldMap(M: Identity): (f: (a: A) => M) => (fa: List.List) => M; /** * Creates an array of unique values, in order, from all given arrays using a `Equal` for equality comparisons */ export declare function union_(E: Equal): (xs: List.List, ys: List.List) => List.List; /** * Creates an array of unique values, in order, from all given arrays using a `Equal` for equality comparisons */ export declare function union(E: Equal): (ys: List.List) => (xs: List.List) => List.List; /** * Remove duplicates from an array, keeping the first occurrence of an element. */ export declare function uniq(E: Equal): (as: List.List) => List.List; //# sourceMappingURL=operations.d.ts.map