• Applies the function to transform the result of the computation.

    Examples

    import { evalCont, mapCont, pure } from "./cont.ts";
    import { assertEquals } from "../deps.ts";

    const actual = evalCont(mapCont((x: number) => x + 1)(pure(42)));
    assertEquals(actual, 43);

    Type Parameters

    • R

    Parameters

    • mapper: ((r) => R)
        • (r): R
        • Parameters

          • r: R

          Returns R

    Returns (<A>(cont) => Cont<R, A>)

      • <A>(cont): Cont<R, A>
      • Type Parameters

        • A

        Parameters

        Returns Cont<R, A>

Generated using TypeDoc