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

compose #4

Closed
semmel opened this issue May 10, 2017 · 2 comments
Closed

compose #4

semmel opened this issue May 10, 2017 · 2 comments
Assignees

Comments

@semmel
Copy link

semmel commented May 10, 2017

function compose() {
    return F\_apply('Tarsana\Functional\pipe', array_reverse(func_get_args()));
}

I find it sometimes more convenient to think in composing functions (f · g)(x) = f(g(x)) instead of function pipes x ➜ g ➜ f = f(g(x) which have such an imperative touch.

@webNeat webNeat self-assigned this May 10, 2017
@webNeat
Copy link
Member

webNeat commented May 10, 2017

Thanks for the remark, I will add the compose function.

@webNeat
Copy link
Member

webNeat commented May 11, 2017

Added here 687d271

Will be included in version 2.2.0

@webNeat webNeat closed this as completed May 11, 2017
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

2 participants