@mikuroxina/mini-fn
    Preparing search index...

    Function map

    • Maps the hom X => A with f.

      Type Parameters

      • X

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

      The mapped hom.

      Examples

      const mapper = map<string>()((x: number) => x * 2);
      expect(mapper(parseInt)("20")).toStrictEqual(40);