Composes multiple asynchronous (or synchronous) functions into a single function, executing them from right to left.
The input type of the composed function.
The final output type after all compositions.
Functions to compose, executed from right to left.
A new function that represents the asynchronous composition.
const addOne = async (x: number) => x + 1;const double = async (x: number) => x * 2;const process = asyncCompose(double, addOne);await process(3); // → 8 Copy
const addOne = async (x: number) => x + 1;const double = async (x: number) => x * 2;const process = asyncCompose(double, addOne);await process(3); // → 8
1.0.0
Composes multiple asynchronous (or synchronous) functions into a single function, executing them from right to left.