Function compose

  • Compose functions to produce a new function.

    Type Parameters

    Parameters

    • Rest...fns: FS

    Returns ((...args: Parameters<Head<FS>>) => ReturnType<Last<FS>>)

    The composed function will expect the parameters of the first function, and return the result of the last function.

      • (...args): ReturnType<Last<FS>>
      • Parameters

        • Rest...args: Parameters<Head<FS>>

        Returns ReturnType<Last<FS>>

    args functions to be composed. Each function will receive the return value of the previous function as its parameters.