import { Monoid } from "./monoid"; import { Applicative, ApplicativeDictionary } from "./applicative"; import { Traversable } from "./traversable"; import { Monad } from "./monad"; import { Either } from "./either"; export declare class Cons implements Monoid>, Monad, Traversable { private val; private tail; constructor(val: A, tail: Cons); combine(c: Cons): Cons; identity(): Cons; of(b: B): Cons; chain(f: (a: A) => Cons): Cons; traverse(a: ApplicativeDictionary, f: (a: A) => Applicative): Applicative>; map: (f: (a: A) => B) => Cons; mapTo: (b: B) => Cons; ap: (a: Monad<(a: A) => B>) => Cons; lift: (f: Function, ...ms: any[]) => Cons; multi: boolean; flatten: () => Cons; foldr: (f: (a: A, b: B) => B, acc: B) => B; foldl: (f: (acc: B, a: A) => B, init: B) => B; sequence: (a: ApplicativeDictionary, t: Cons>) => Applicative>; shortFoldr: (f: (a: A, b: B) => Either, acc: B) => B; shortFoldl: (f: (acc: B, a: A) => Either, acc: B) => B; size: () => number; maximum: () => number; minimum: () => number; sum: () => number; } export declare const nil: Cons; export declare function cons(a: A, as: Cons): Cons; export declare function fromArray(as: A[]): Cons;