Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compose function which supports generators #7

Open
tomkis opened this issue Dec 16, 2015 · 0 comments
Open

Add compose function which supports generators #7

tomkis opened this issue Dec 16, 2015 · 0 comments
Assignees

Comments

@tomkis
Copy link
Collaborator

tomkis commented Dec 16, 2015

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)

@tomkis tomkis self-assigned this Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant