The function is especially very useful with immutable data structures. May be a fork of redux compose function. The support of generators should be transparent yet the function should always return generator.
/**
* @param {...Function} functions to be composed, may be either function* or function
* @returns {Function} Functions which takes initial argument and returns iterable
*/
function* compose(...fns) { }
Composition is right to left so that it's more easier for people to use:
compose(f, g)(x) is actually (g ∘ f)(x)
The function is especially very useful with immutable data structures. May be a fork of redux compose function. The support of generators should be transparent yet the function should always return generator.
Composition is right to left so that it's more easier for people to use:
compose(f, g)(x)is actually(g ∘ f)(x)