import type { Eq } from "@principia/prelude/Eq"; import type { Ord } from "@principia/prelude/Ord"; import type { Option } from "../Option"; import type { ReadonlyRecord } from "../Record"; import type { NonEmptyArray } from "./model"; export declare const head: (as: NonEmptyArray) => A; export declare const tail: (as: NonEmptyArray) => readonly A[]; export declare const reverse: (as: NonEmptyArray) => NonEmptyArray; export declare const min: (O: Ord) => (as: NonEmptyArray) => A; export declare const max: (O: Ord) => (as: NonEmptyArray) => A; export declare function append_(xs: ReadonlyArray, ys: NonEmptyArray): NonEmptyArray; export declare function append_(xs: NonEmptyArray, ys: ReadonlyArray): NonEmptyArray; export declare function append(ys: NonEmptyArray): (xs: ReadonlyArray) => NonEmptyArray; export declare function append(ys: ReadonlyArray): (xs: ReadonlyArray) => NonEmptyArray; /** * Group equal, consecutive elements of an array into non empty arrays. * * @category Combinators * @since 1.0.0 */ export declare function group( E: Eq ): { (as: NonEmptyArray): NonEmptyArray>; (as: ReadonlyArray): ReadonlyArray>; }; /** * Sort and then group the elements of an array into non empty arrays. * * @category Combinators * @since 1.0.0 */ export declare const groupSort: (O: Ord) => (as: readonly A[]) => readonly NonEmptyArray[]; /** * Splits an array into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning * function on each element, and grouping the results according to values returned * * @category Combinators * @since 1.0.0 */ export declare const groupBy: ( f: (a: A) => string ) => (as: readonly A[]) => Readonly>>; /** * Get the last elements of a non empty array * * @since 1.0.0 */ export declare const last: (as: NonEmptyArray) => A; /** * Get all but the last element of a non empty array, creating a new array. * * @since 1.0.0 */ export declare const init: (as: NonEmptyArray) => readonly A[]; /** * @category Combinators * @since 1.0.0 */ export declare const sort: (O: Ord) => (as: NonEmptyArray) => NonEmptyArray; export declare const insertAt_: (as: NonEmptyArray, i: number, a: A) => Option>; export declare const insertAt: (i: number, a: A) => (as: NonEmptyArray) => Option>; export declare const updateAt_: (as: NonEmptyArray, i: number, a: A) => Option>; export declare const updateAt: (i: number, a: A) => (as: NonEmptyArray) => Option>; /** * Apply a function to the element at the specified index, creating a new array, or returning `None` if the index is out * of bounds * * @since 1.0.0 */ export declare const modifyAt_: (as: NonEmptyArray, i: number, f: (a: A) => A) => Option>; /** * Apply a function to the element at the specified index, creating a new array, or returning `None` if the index is out * of bounds * * @since 1.0.0 */ export declare const modifyAt: (i: number, f: (a: A) => A) => (as: NonEmptyArray) => Option>; /** * @since 1.0.0 */ export declare const unzip: (as: NonEmptyArray) => readonly [NonEmptyArray, NonEmptyArray]; //# sourceMappingURL=combinators.d.ts.map