export declare type Sizes = number[] | undefined;
export declare class Node {
sizes: Sizes;
array: any[];
constructor(sizes: Sizes, array: any[]);
}
export declare class List implements Iterable {
readonly bits: number;
readonly offset: number;
readonly length: number;
readonly prefix: A[];
readonly root: Node | undefined;
readonly suffix: A[];
constructor(bits: number, offset: number, length: number, prefix: A[], root: Node | undefined, suffix: A[]);
[Symbol.iterator](): Iterator;
toJSON(): A[];
}
export declare function backwards(l: List): Iterable;
export declare function list(...elements: A[]): List;
export declare function empty(): List;
export declare function of(a: A): List;
export declare function pair(first: A, second: A): List;
export declare function from(sequence: A[] | ArrayLike | Iterable): List;
export declare function range(start: number, end: number): List;
export declare function repeat(value: A, times: number): List;
export declare function times(func: (index: number) => A, times: number): List;
export declare function nth(index: number, l: List): A | undefined;
export declare function prepend(value: A, l: List): List;
export declare function append(value: A, l: List): List;
export declare function length(l: List): number;
export declare function first(l: List): A | undefined;
export declare const head: typeof first;
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 foldl(f: (acc: B, value: A) => B, initial: B, l: List): B;
export declare const reduce: typeof foldl;
export interface Of {
"fantasy-land/of"(a: B): Applicative;
}
export interface Applicative {
"fantasy-land/map"(f: (a: A) => B): Applicative;
"fantasy-land/ap"(fa: Applicative<(a: A) => B>): Applicative;
}
export declare function traverse(of: Of, f: (a: A) => Applicative, l: List): any;
export declare function sequence(ofObj: Of, l: List>): any;
export declare function scan(f: (acc: B, value: A) => B, initial: B, l: List): List;
export declare function forEach(callback: (a: A) => void, l: List): void;
export declare function filter(predicate: (a: A) => a is B, l: List): List;
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) => a is B, l: List): [List, List>];
export declare function partition(predicate: (a: A) => boolean, l: List): [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 flatMap(f: (a: A) => List, l: List): List;
export declare const chain: typeof flatMap;
export declare function foldlWhile(predicate: (acc: B, value: A) => boolean, f: (acc: B, value: A) => B, initial: B, l: List): B;
export declare const reduceWhile: typeof foldlWhile;
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 findLast(predicate: (a: A) => boolean, l: List): A | undefined;
export declare function indexOf(element: A, l: List): number;
export declare function lastIndexOf(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(l1: List, l2: List): boolean;
export declare function equalsWith(f: (a: A, b: A) => boolean, l1: List, l2: 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 takeLastWhile(predicate: (a: A) => boolean, l: List): List;
export declare function dropWhile(predicate: (a: A) => boolean, l: List): List;
export declare function dropRepeats(l: List): List;
export declare function dropRepeatsWith(predicate: (a: A, b: 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 splitWhen(predicate: (a: A) => boolean, l: List): [List, List];
export declare function splitEvery(size: number, l: 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 insert(index: number, element: A, l: List): List;
export declare function insertAll(index: number, elements: List, l: List): List;
export declare function reverse(l: List): List;
export declare function isList(l: any): l is List;
export declare function zip(as: List, bs: List): List<[A, B]>;
export declare function zipWith(f: (a: A, b: B) => C, as: List, bs: List): List;
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;
export declare function group(l: List): List>;
export declare function groupWith(f: (a: A, b: A) => boolean, l: List): List>;
export declare function intersperse(separator: A, l: List): List;
export declare function isEmpty(l: List): boolean;