• Lifts down a Cat which contains a mapping function. It is useful to decompose a function in Cat.

    Type Parameters

    • T1

    • U1

    Parameters

    • fn: Cat<((t) => U1)>

      A Cat which contains a mapping function.

    Returns ((t) => Cat<U1>)

    An applied function which maps from Cat<T> to Cat<U>.

    Examples

    import { cat, apply } from "./cat.ts";
    import { assertEquals } from "../deps.ts";

    const sub = cat((numeral: string) => parseInt(numeral, 10));
    const actual = apply(sub)(cat("1024")).value;
    assertEquals(actual, 1024);
      • (t): Cat<U1>
      • Parameters

        Returns Cat<U1>

Generated using TypeDoc