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

    Function pipe

    • Composes two functions sequentially. z = pipe(a)(b)(x) means y = a(x), z = b(y).

      Type Parameters

      • T
      • U

      Parameters

      • firstDo: Fn<T, U>

        The function to do at first.

      Returns <V>(secondDo: Fn<U, V>) => (t: T) => V

      The composed function.

      Examples

      expect(pipe((x: number) => x + 1)((x) => x * 2)(3)).toStrictEqual(8);