1 | export declare type Sizes = number[] | undefined;
|
2 | export declare class Node {
|
3 | sizes: Sizes;
|
4 | array: any[];
|
5 | constructor(sizes: Sizes, array: any[]);
|
6 | }
|
7 | export declare class List<A> implements Iterable<A> {
|
8 | readonly bits: number;
|
9 | readonly offset: number;
|
10 | readonly length: number;
|
11 | readonly prefix: A[];
|
12 | readonly root: Node | undefined;
|
13 | readonly suffix: A[];
|
14 | constructor(bits: number, offset: number, length: number, prefix: A[], root: Node | undefined, suffix: A[]);
|
15 | [Symbol.iterator](): Iterator<A>;
|
16 | toJSON(): A[];
|
17 | }
|
18 | export declare function backwards<A>(l: List<A>): Iterable<A>;
|
19 | export declare function list<A>(...elements: A[]): List<A>;
|
20 | export declare function empty<A = any>(): List<A>;
|
21 | export declare function of<A>(a: A): List<A>;
|
22 | export declare function pair<A>(first: A, second: A): List<A>;
|
23 | export declare function from<A>(sequence: A[] | ArrayLike<A> | Iterable<A>): List<A>;
|
24 | export declare function range(start: number, end: number): List<number>;
|
25 | export declare function repeat<A>(value: A, times: number): List<A>;
|
26 | export declare function times<A>(func: (index: number) => A, times: number): List<A>;
|
27 | export declare function nth<A>(index: number, l: List<A>): A | undefined;
|
28 | export declare function prepend<A>(value: A, l: List<A>): List<A>;
|
29 | export declare function append<A>(value: A, l: List<A>): List<A>;
|
30 | export declare function length(l: List<any>): number;
|
31 | export declare function first<A>(l: List<A>): A | undefined;
|
32 | export declare const head: typeof first;
|
33 | export declare function last<A>(l: List<A>): A | undefined;
|
34 | export declare function map<A, B>(f: (a: A) => B, l: List<A>): List<B>;
|
35 | export declare function pluck<A, K extends keyof A>(key: K, l: List<A>): List<A[K]>;
|
36 | export declare function foldl<A, B>(f: (acc: B, value: A) => B, initial: B, l: List<A>): B;
|
37 | export declare const reduce: typeof foldl;
|
38 | export interface Of {
|
39 | "fantasy-land/of"<B>(a: B): Applicative<B>;
|
40 | }
|
41 | export interface Applicative<A> {
|
42 | "fantasy-land/map"<B>(f: (a: A) => B): Applicative<B>;
|
43 | "fantasy-land/ap"<B>(fa: Applicative<(a: A) => B>): Applicative<B>;
|
44 | }
|
45 | export declare function traverse<A, B>(of: Of, f: (a: A) => Applicative<B>, l: List<A>): any;
|
46 | export declare function sequence<A>(ofObj: Of, l: List<Applicative<A>>): any;
|
47 | export declare function scan<A, B>(f: (acc: B, value: A) => B, initial: B, l: List<A>): List<B>;
|
48 | export declare function forEach<A>(callback: (a: A) => void, l: List<A>): void;
|
49 | export declare function filter<A, B extends A>(predicate: (a: A) => a is B, l: List<A>): List<B>;
|
50 | export declare function filter<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
51 | export declare function reject<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
52 | export declare function partition<A, B extends A>(predicate: (a: A) => a is B, l: List<A>): [List<B>, List<Exclude<A, B>>];
|
53 | export declare function partition<A>(predicate: (a: A) => boolean, l: List<A>): [List<A>, List<A>];
|
54 | export declare function join(separator: string, l: List<string>): string;
|
55 | export declare function foldr<A, B>(f: (value: A, acc: B) => B, initial: B, l: List<A>): B;
|
56 | export declare const reduceRight: typeof foldr;
|
57 | export declare function ap<A, B>(listF: List<(a: A) => B>, l: List<A>): List<B>;
|
58 | export declare function flatten<A>(nested: List<List<A>>): List<A>;
|
59 | export declare function flatMap<A, B>(f: (a: A) => List<B>, l: List<A>): List<B>;
|
60 | export declare const chain: typeof flatMap;
|
61 | export declare function foldlWhile<A, B>(predicate: (acc: B, value: A) => boolean, f: (acc: B, value: A) => B, initial: B, l: List<A>): B;
|
62 | export declare const reduceWhile: typeof foldlWhile;
|
63 | export declare function every<A>(predicate: (a: A) => boolean, l: List<A>): boolean;
|
64 | export declare const all: typeof every;
|
65 | export declare function some<A>(predicate: (a: A) => boolean, l: List<A>): boolean;
|
66 | export declare const any: typeof some;
|
67 | export declare function none<A>(predicate: (a: A) => boolean, l: List<A>): boolean;
|
68 | export declare function find<A>(predicate: (a: A) => boolean, l: List<A>): A | undefined;
|
69 | export declare function findLast<A>(predicate: (a: A) => boolean, l: List<A>): A | undefined;
|
70 | export declare function indexOf<A>(element: A, l: List<A>): number;
|
71 | export declare function lastIndexOf<A>(element: A, l: List<A>): number;
|
72 | export declare function findIndex<A>(predicate: (a: A) => boolean, l: List<A>): number;
|
73 | export declare function includes<A>(element: A, l: List<A>): boolean;
|
74 | export declare const contains: typeof includes;
|
75 | export declare function equals<A>(l1: List<A>, l2: List<A>): boolean;
|
76 | export declare function equalsWith<A>(f: (a: A, b: A) => boolean, l1: List<A>, l2: List<A>): boolean;
|
77 | export declare function concat<A>(left: List<A>, right: List<A>): List<A>;
|
78 | export declare function update<A>(index: number, a: A, l: List<A>): List<A>;
|
79 | export declare function adjust<A>(index: number, f: (a: A) => A, l: List<A>): List<A>;
|
80 | export declare function slice<A>(from: number, to: number, l: List<A>): List<A>;
|
81 | export declare function take<A>(n: number, l: List<A>): List<A>;
|
82 | export declare function takeWhile<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
83 | export declare function takeLastWhile<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
84 | export declare function dropWhile<A>(predicate: (a: A) => boolean, l: List<A>): List<A>;
|
85 | export declare function dropRepeats<A>(l: List<A>): List<A>;
|
86 | export declare function dropRepeatsWith<A>(predicate: (a: A, b: A) => Boolean, l: List<A>): List<A>;
|
87 | export declare function takeLast<A>(n: number, l: List<A>): List<A>;
|
88 | export declare function splitAt<A>(index: number, l: List<A>): [List<A>, List<A>];
|
89 | export declare function splitWhen<A>(predicate: (a: A) => boolean, l: List<A>): [List<A>, List<A>];
|
90 | export declare function splitEvery<A>(size: number, l: List<A>): List<List<A>>;
|
91 | export declare function remove<A>(from: number, amount: number, l: List<A>): List<A>;
|
92 | export declare function drop<A>(n: number, l: List<A>): List<A>;
|
93 | export declare function dropLast<A>(n: number, l: List<A>): List<A>;
|
94 | export declare function pop<A>(l: List<A>): List<A>;
|
95 | export declare const init: typeof pop;
|
96 | export declare function tail<A>(l: List<A>): List<A>;
|
97 | export declare function toArray<A>(l: List<A>): A[];
|
98 | export declare function insert<A>(index: number, element: A, l: List<A>): List<A>;
|
99 | export declare function insertAll<A>(index: number, elements: List<A>, l: List<A>): List<A>;
|
100 | export declare function reverse<A>(l: List<A>): List<A>;
|
101 | export declare function isList<A>(l: any): l is List<A>;
|
102 | export declare function zip<A, B>(as: List<A>, bs: List<B>): List<[A, B]>;
|
103 | export declare function zipWith<A, B, C>(f: (a: A, b: B) => C, as: List<A>, bs: List<B>): List<C>;
|
104 | export declare type Ordering = -1 | 0 | 1;
|
105 | export interface Ord {
|
106 | "fantasy-land/lte"(b: any): boolean;
|
107 | }
|
108 | export declare type Comparable = number | string | Ord;
|
109 | export declare function sort<A extends Comparable>(l: List<A>): List<A>;
|
110 | export declare function sortWith<A>(comparator: (a: A, b: A) => Ordering, l: List<A>): List<A>;
|
111 | export declare function sortBy<A, B extends Comparable>(f: (a: A) => B, l: List<A>): List<A>;
|
112 | export declare function group<A>(l: List<A>): List<List<A>>;
|
113 | export declare function groupWith<A>(f: (a: A, b: A) => boolean, l: List<A>): List<List<A>>;
|
114 | export declare function intersperse<A>(separator: A, l: List<A>): List<A>;
|
115 | export declare function isEmpty(l: List<any>): boolean;
|
116 |
|
\ | No newline at end of file |