Function compose

  • Compose functions to produce a new function.

    Type Parameters

    Parameters

    • ...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 functions to be composed. Each function will receive the return value of the previous function as its parameters.