UNPKG

674 BTypeScriptView Raw
1import { Lazy } from './lazy';
2/**
3 * @description lazy linked list
4 * */
5export declare class LazyList<A> extends Lazy<A> {
6 private isHead?;
7 private tail?;
8 private mapper?;
9 constructor(value?: () => A, tail?: LazyList<A>, mapper?: (x: any) => A);
10 append(a: () => A): LazyList<A>;
11 appendRaw(a: A): LazyList<A>;
12 appendAll(xs: A[]): LazyList<A>;
13 /** @description non-lazy */
14 toArray(thisArg?: LazyList<A>): A[];
15 /** @override */
16 map<B>(f: (a: A) => B): LazyList<B>;
17}
18export declare namespace LazyList {
19 const headSymbol: unique symbol;
20 const empty: <A>() => LazyList<A>;
21 const fromArray: <A>(xs: A[]) => LazyList<A>;
22}