import { Functor } from '../data/Functor'; export interface ChainFunction { (a: A): Monad; } /** * Monad */ export interface Monad extends Functor { of(t: A): Monad; chain(f: (a: A) => Monad): Monad; } /** * composeK two monadic functions into one. */ export declare const composeK: (f: ChainFunction, g: ChainFunction) => ChainFunction; /** * pipeK the result of one monadic function into another. */ export declare const pipeK: (f: ChainFunction, g: ChainFunction) => ChainFunction; /** * chain is a partially applied version of a Monad's chain. * It allows us to avoid anonymous functions when chaining monads. */ export declare const chain: (f: ChainFunction) => (m: Monad) => Monad;