• Lifts the binary operation q over the hom X => _.

    Type Parameters

    • X

    Returns (<A, B, C>(q) => ((f) => ((g) => Fn<X, C>)))

    The lifted hom X => C.

    Examples

    import { assertEquals } from "../deps.ts";
    import { liftBinary } from "./func.ts";

    const lifter = liftBinary<void>()((a: number) => (b: number) => a + b);
    assertEquals(lifter(() => 1)(() => 2)(), 3);
      • <A, B, C>(q): ((f) => ((g) => Fn<X, C>))
      • Type Parameters

        • A

        • B

        • C

        Parameters

        • q: ((a) => ((b) => C))
            • (a): ((b) => C)
            • Parameters

              • a: A

              Returns ((b) => C)

                • (b): C
                • Parameters

                  • b: B

                  Returns C

        Returns ((f) => ((g) => Fn<X, C>))

          • (f): ((g) => Fn<X, C>)
          • Parameters

            • f: Fn<X, A>

            Returns ((g) => Fn<X, C>)

              • (g): Fn<X, C>
              • Parameters

                • g: Fn<X, B>

                Returns Fn<X, C>

Generated using TypeDoc