UNPKG

@jsoldi/hkt

Version:

Higher kinded types for typescript and a few utility monads.

13 lines 842 B
import { $ } from "../../core/hkt.js"; import { IMonadFree } from "../free/monadFree.js"; import { ContFree, IContFunctorFree } from "./contFunctorFree.js"; /** The continuation monad interface, where results are wrapped in a free monad based on a monad. */ export interface IContMonadFree<F> extends IContFunctorFree<F> { /** The monad underlying the free monad that wraps the continuation results. */ readonly contMonad: IMonadFree<F>; /** Unwraps the continuation's free monad into the underlying monad. Inverse of `IContMonadFree`'s `delay`. */ run<A>(cta: ContFree<A, F>): $<F, A>; } /** Creates a continuation monad where results are wrapped in a free monad given a free monad based on a monad. */ export declare function contMonadFree<F>(m: IMonadFree<F>): IContMonadFree<F>; //# sourceMappingURL=contMonadFree.d.ts.map