Design Pattern: Inversion of control
- Discrete Math
- Decoupling Dependencies
- Monad Transformers
- Monad Functions
- Closure operators on partially ordered sets
I personally find it important to understand the background in the tools I use.
Using category theory, create a monad to execute a series of functions and yield a product without tight coupling of the fuctions.
export const asyncPipe = (...fns) => x => (
fns.reduce(async (y, f) => f(await y), x)
);
/** @todo **/