export declare function setEquals(equals: (a: any, b: any) => boolean): void;
export declare type Sizes = number[] | undefined;
export declare class Node {
sizes: Sizes;
array: any[];
constructor(sizes: Sizes, array: any[]);
}
export declare function nth(index: number, l: List): A | undefined;
export declare class List {
bits: number;
offset: number;
length: number;
root: Node | undefined;
suffix: A[];
prefix: A[];
constructor(bits: number, offset: number, length: number, root: Node | undefined, suffix: A[], prefix: A[]);
[Symbol.iterator](): Iterator;
}
export declare function prepend(value: A, l: List): List;
export declare function append(value: A, l: List): List;
export declare function list(...elements: A[]): List;
export declare function of(a: A): List;
export declare function pair(first: A, second: A): List;
export declare function empty(): List;
export declare function repeat(value: A, times: number): List;
/**
* Generates a new list by calling a function with the current index
* `n` times.
* @param func Function used to generate list values.
* @param times Number of values to generate.
*/
export declare function times(func: (index: number) => A, times: number): List;
/**
* Gets the length of a list.
*
* @example
* length(list(0, 1, 2, 3)); //=> 4
*
* @param l The list to get the length of.
*/
export declare function length(l: List): number;
export declare function first(l: List): A | undefined;
export declare function last(l: List): A | undefined;
export declare function map(f: (a: A) => B, l: List): List;
export declare function pluck(key: K, l: List): List;
export declare function range(start: number, end: number): List;
/**
* Folds a function over a list. Left-associative.
*
* @example
* foldl((n, m) => n - m, 1, list(2, 3, 4, 5)); //=> -13
*/
export declare function foldl(f: (acc: B, value: A) => B, initial: B, l: List): B;
export declare const reduce: typeof foldl;
export declare function forEach(callback: (a: A) => void, l: List): void;
export declare function filter(predicate: (a: A) => boolean, l: List): List;
export declare function reject(predicate: (a: A) => boolean, l: List): List;
export declare function partition(predicate: (a: A) => boolean, l: List): List>;
export declare function join(separator: string, l: List): string;
export declare function foldr(f: (value: A, acc: B) => B, initial: B, l: List): B;
export declare const reduceRight: typeof foldr;
export declare function ap(listF: List<(a: A) => B>, l: List): List;
export declare function flatten(nested: List>): List;
export declare function chain(f: (a: A) => List, l: List): List;
export declare function every(predicate: (a: A) => boolean, l: List): boolean;
export declare const all: typeof every;
export declare function some(predicate: (a: A) => boolean, l: List): boolean;
export declare const any: typeof some;
export declare function none(predicate: (a: A) => boolean, l: List): boolean;
export declare function find(predicate: (a: A) => boolean, l: List): A | undefined;
export declare function indexOf(element: A, l: List): number;
export declare function findIndex(predicate: (a: A) => boolean, l: List): number;
export declare function includes(element: A, l: List): boolean;
export declare const contains: typeof includes;
export declare function equals(firstList: List, secondList: List): boolean;
export declare function concat(left: List, right: List): List;
export declare function update(index: number, a: A, l: List): List;
export declare function adjust(index: number, f: (a: A) => A, l: List): List;
export declare function slice(from: number, to: number, l: List): List;
export declare function take(n: number, l: List): List;
export declare function takeWhile(predicate: (a: A) => boolean, l: List): List;
export declare function dropWhile(predicate: (a: A) => boolean, l: List): List;
export declare function takeLast(n: number, l: List): List;
export declare function splitAt(index: number, l: List): [List, List];
export declare function remove(from: number, amount: number, l: List): List;
export declare function drop(n: number, l: List): List;
export declare function dropLast(n: number, l: List): List;
export declare function pop(l: List): List;
export declare const init: typeof pop;
export declare function tail(l: List): List;
export declare function toArray(l: List): A[];
export declare function fromArray(array: A[]): List;
export declare function fromIterable(iterable: IterableIterator): List;
export declare function insert(index: number, element: A, l: List): List;
export declare function insertAll(index: number, elements: List, l: List): List;
/**
* Reverses a list.
* @category Updater
* @param l The list to reverse.
* @returns A reversed list.
*/
export declare function reverse(l: List): List;
export declare function isList(l: any): l is List;
export declare function zipWith(f: (a: A, b: B) => C, as: List, bs: List): List;
export declare function zip(as: List, bs: List): List<[A, B]>;
export declare type Ordering = -1 | 0 | 1;
export interface Ord {
"fantasy-land/lte"(b: any): boolean;
}
export declare type Comparable = number | string | Ord;
export declare function sort(l: List): List;
export declare function sortWith(comparator: (a: A, b: A) => Ordering, l: List): List;
export declare function sortBy(f: (a: A) => B, l: List): List;