1 | export declare function setEquals(equals: (a: any, b: any) => boolean): void;
|
2 | export declare type Sizes = number[] | undefined;
|
3 | export declare class Node {
|
4 | sizes: Sizes;
|
5 | array: any[];
|
6 | constructor(sizes: Sizes, array: any[]);
|
7 | }
|
8 | export declare function nth<A>(index: number, l: List<A>): A;
|
9 | export declare class List<A> {
|
10 | bits: number;
|
11 | offset: number;
|
12 | length: number;
|
13 | root: Node | undefined;
|
14 | suffix: A[];
|
15 | prefix: A[];
|
16 | constructor(bits: number, offset: number, length: number, root: Node | undefined, suffix: A[], prefix: A[]);
|
17 | [Symbol.iterator](): Iterator<A>;
|
18 | }
|
19 | export declare function prepend<A>(value: A, l: List<A>): List<A>;
|
20 | export declare function append<A>(value: A, l: List<A>): List<A>;
|
21 | export declare function list<A>(...elements: A[]): List<A>;
|
22 | export declare function pair<A>(first: A, second: A): List<A>;
|
23 | export declare function empty(): List<any>;
|
24 | export declare function repeat<A>(value: A, times: number): List<A>;
|
25 | export declare function length(l: List<any>): number;
|
26 | export declare function first<A>(l: List<A>): A | undefined;
|
27 | export declare function last<A>(l: List<A>): A | undefined;
|
28 | export declare function map<A, B>(f: (a: A) => B, l: List<A>): List<B>;
|
29 | export declare function pluck<A, K extends keyof A>(key: K, l: List<A>): List<A[K]>;
|
30 | export declare function range(start: number, end: number): List<number>;
|
31 | export declare function foldl<A, B>(f: (acc: B, value: A) => B, initial: B, l: List<A>): B;
|
32 | export declare const reduce: typeof foldl;
|
33 | export declare function filter<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
34 | export declare function reject<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
35 | export declare function partition<A>(predicate: (a: A) => boolean, l: List<A>): List<List<A>>;
|
36 | export declare function join(separator: string, l: List<string>): string;
|
37 | export declare function foldr<A, B>(f: (value: A, acc: B) => B, initial: B, l: List<A>): B;
|
38 | export declare const reduceRight: typeof foldr;
|
39 | export declare function flatten<A>(nested: List<List<A>>): List<A>;
|
40 | export declare function every<A>(predicate: (a: A) => boolean, l: List<A>): boolean;
|
41 | export declare const all: typeof every;
|
42 | export declare function some<A>(predicate: (a: A) => boolean, l: List<A>): boolean;
|
43 | export declare const any: typeof some;
|
44 | export declare function none<A>(predicate: (a: A) => boolean, l: List<A>): boolean;
|
45 | export declare function find<A>(predicate: (a: A) => boolean, l: List<A>): A | undefined;
|
46 | export declare function indexOf<A>(element: A, l: List<A>): number;
|
47 | export declare function findIndex<A>(predicate: (a: A) => boolean, l: List<A>): number;
|
48 | export declare function includes<A>(element: A, l: List<A>): boolean;
|
49 | export declare const contains: typeof includes;
|
50 | export declare function equals<A>(firstList: List<A>, secondList: List<A>): boolean;
|
51 | export declare function concat<A>(left: List<A>, right: List<A>): List<A>;
|
52 | export declare function update<A>(index: number, a: A, l: List<A>): List<A>;
|
53 | export declare function adjust<A>(f: (a: A) => A, index: number, l: List<A>): List<A>;
|
54 | export declare function slice<A>(from: number, to: number, l: List<A>): List<A>;
|
55 | export declare function take<A>(n: number, l: List<A>): List<A>;
|
56 | export declare function takeWhile<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
57 | export declare function dropWhile<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
58 | export declare function takeLast<A>(n: number, l: List<A>): List<A>;
|
59 | export declare function splitAt<A>(index: number, l: List<A>): [List<A>, List<A>];
|
60 | export declare function remove<A>(from: number, amount: number, l: List<A>): List<A>;
|
61 | export declare function drop<A>(n: number, l: List<A>): List<A>;
|
62 | export declare function dropLast<A>(n: number, l: List<A>): List<A>;
|
63 | export declare function pop<A>(l: List<A>): List<A>;
|
64 | export declare const init: typeof pop;
|
65 | export declare function tail<A>(l: List<A>): List<A>;
|
66 | export declare function toArray<A>(l: List<A>): A[];
|
67 | export declare function fromArray<A>(array: A[]): List<A>;
|
68 | export declare function fromIterable<A>(iterable: IterableIterator<A>): List<A>;
|
69 | export declare function insert<A>(index: number, element: A, l: List<A>): List<A>;
|
70 | export declare function insertAll<A>(index: number, elements: List<A>, l: List<A>): List<A>;
|