• Maps the hom X => A with f.

    Type Parameters

    • X

    Returns (<A, B>(f) => ((a) => Fn<X, B>))

    The mapped hom.

    Examples

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

    const mapper = map<string>()((x: number) => x * 2);
    assertEquals(mapper(parseInt)("20"), 40);
      • <A, B>(f): ((a) => Fn<X, B>)
      • Type Parameters

        • A

        • B

        Parameters

        • f: ((a) => B)
            • (a): B
            • Parameters

              • a: A

              Returns B

        Returns ((a) => Fn<X, B>)

          • (a): Fn<X, B>
          • Parameters

            • a: Fn<X, A>

            Returns Fn<X, B>

Generated using TypeDoc