import { Either } from '@typed/either'; import { List } from '@typed/list'; import { Maybe } from '@typed/maybe'; /** * Creates a new `Monad` from the value contained in another. * Works with `Maybe`, `Either`, `PromiseLike` and `List` data * structures. * @name chain(f: (value: A) => List, list: List): Array */ export declare const chain: Chain; export declare type Chain = { (f: (value: A, index: number) => List, list: List): Array; (f: (value: A) => Maybe, maybe: Maybe): Maybe; (f: (value: A) => PromiseLike, promise: PromiseLike): Promise; (f: (value: B) => Either, either: Either): Either; (f: (value: A, index: number) => List): (list: List) => Array; (f: (value: A) => Maybe): (maybe: Maybe) => Maybe; (f: (value: A) => PromiseLike): (promise: PromiseLike) => Promise; (f: (value: B) => Either): (either: Either) => Either; };