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

    Function apply

    • 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.Cat<(t: T1) => U1>

        A Cat which contains a mapping function.

      Returns (t: Cat.Cat<T1>) => Cat.Cat<U1>

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

      Examples

      const sub = cat((numeral: string) => parseInt(numeral, 10));
      const actual = apply(sub)(cat("1024")).value;
      expect(actual).toStrictEqual(1024);