@beenotung/tslib
Version:
utils library in Typescript
23 lines (22 loc) • 674 B
TypeScript
import { Lazy } from './lazy';
/**
* @description lazy linked list
* */
export declare class LazyList<A> extends Lazy<A> {
private isHead?;
private tail?;
private mapper?;
constructor(value?: () => A, tail?: LazyList<A>, mapper?: (x: any) => A);
append(a: () => A): LazyList<A>;
appendRaw(a: A): LazyList<A>;
appendAll(xs: A[]): LazyList<A>;
/** @description non-lazy */
toArray(thisArg?: LazyList<A>): A[];
/** @override */
map<B>(f: (a: A) => B): LazyList<B>;
}
export declare namespace LazyList {
const headSymbol: unique symbol;
const empty: <A>() => LazyList<A>;
const fromArray: <A>(xs: A[]) => LazyList<A>;
}