import type { Array } from "@effect-ts/system/Collections/Immutable/Array"; 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 * 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"; import * as Tp from "../Tuple/index.js"; export * from "@effect-ts/system/Collections/Immutable/Array"; /** * `ForEachWithIndex`'s `forEachWithIndexF` function */ export declare const forEachWithIndexF: P.ForEachWithIndexFn<[URI<"Array", {}>], P.Auto>; /** * `ForEach`'s `forEachF` function */ export declare const forEachF: P.ForeachFn<[URI<"Array", {}>], P.Auto>; /** * `Wilt`'s `separateF` function */ export declare const separateF: P.Wilt<[URI<"Array", {}>], P.Auto>; /** * `Wilt`'s `separateF` function */ export declare const separateWithIndexF: P.WiltWithIndex<[URI<"Array", {}>], P.Auto>; /** * `Wither`'s `compactF` function */ export declare const compactF: P.Wither<[URI<"Array", {}>], P.Auto>; /** * `WitherWithIndex`'s `compactWithIndexF` function */ export declare const compactWithIndexF: P.WitherWithIndex<[URI<"Array", {}>], 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: Array) => 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 `Array`. */ export declare function elem_(E: Equal): (as: Array, 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: Array, ys: Array) => Array; /** * 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: Array) => (xs: Array) => Array; /** * 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 `Array` */ export declare function getIdentity(): Identity>; /** * Returns a `Ord` for `Array` given `Ord` */ export declare function getOrd(O: Ord.Ord): Ord.Ord>; /** * 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 array. */ export declare function intersection_(E: Equal): (xs: Array, ys: Array) => Array; /** * 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: Array) => (xs: Array) => Array; /** * Fold Identity with a mapping function */ export declare function foldMap(M: Identity): (f: (a: A) => M) => (fa: readonly A[]) => M; /** * Fold Identity with a mapping function */ export declare function foldMap_(M: Identity): (fa: readonly A[], 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: readonly A[]) => M; /** * Fold Identity with a mapping function that consider also the index */ export declare function foldMapWithIndex_(M: Identity): (fa: readonly A[], f: (i: number, a: A) => M) => M; /** * Sort the elements of an array in increasing order */ export declare function sort(O: Ord.Ord): (as: Array) => Array; /** * 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(ords: Array>): (as: Array) => Array; /** * 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: Array, ys: Array) => Array; /** * 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: Array) => (xs: Array) => Array; /** * Remove duplicates from an array, keeping the first occurrence of an element. */ export declare function uniq(E: Equal): (as: Array) => Array; /** * Separate elements based on a apredicate */ export declare function partition(predicate: Predicate): (fa: readonly A[]) => Tp.Tuple<[readonly A[], readonly A[]]>; /** * Separate elements based on a apredicate */ export declare function partition_(fa: readonly A[], predicate: Predicate): Tp.Tuple<[readonly A[], readonly A[]]>; /** * Separate elements based on a map function */ export declare function partitionMap(f: (a: A) => Either): (fa: readonly A[]) => Tp.Tuple<[readonly B[], readonly C[]]>; /** * Separate elements based on a map function */ export declare function partitionMap_(fa: readonly A[], f: (a: A) => Either): Tp.Tuple<[readonly B[], readonly C[]]>; /** * Separate elements based on a map function that also carry the index */ export declare function partitionMapWithIndex_(fa: readonly A[], f: (i: number, a: A) => Either): Tp.Tuple<[readonly B[], readonly C[]]>; /** * Separate elements based on a map function that also carry the index */ export declare function partitionMapWithIndex(f: (i: number, a: A) => Either): (fa: readonly A[]) => Tp.Tuple<[readonly B[], readonly C[]]>; /** * Separate elements based on a predicate that also carry the index */ export declare function partitionWithIndex(predicateWithIndex: PredicateWithIndex): (fa: readonly A[]) => Tp.Tuple<[readonly A[], readonly A[]]>; /** * Separate elements based on a predicate that also carry the index */ export declare function partitionWithIndex_(fa: readonly A[], predicateWithIndex: PredicateWithIndex): Tp.Tuple<[readonly A[], readonly A[]]>; //# sourceMappingURL=operations.d.ts.map