Skip to content

Add compose function which supports generators #7

Description

@tomkis

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions