Function pipe

  • Pipe function calls

    Pipe provides functional composition with reversed order. First function may have any arity and all other functions are called with only single argument (result from previous function application).

    In case when first function is not provided, pipe returns identity function.

    Returns (<T>(x: T) => T)

      • <T>(x: T): T
      • Type Parameters

        • T


        • x: T

        Returns T

  • Type Parameters

    • TArgs extends any[]

    • TFirstResult

    • TFns


    • first: ((...args: TArgs) => TFirstResult)
        • (...args: TArgs): TFirstResult
        • Parameters

          • Rest ...args: TArgs

          Returns TFirstResult

    • Rest Chain<TFirstResult, TFns>

    Returns ((...args: TArgs) => Result<TFirstResult, TFns>)

      • (...args: TArgs): Result<TFirstResult, TFns>
      • Parameters

        • Rest ...args: TArgs

        Returns Result<TFirstResult, TFns>

Generated using TypeDoc