Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Add compose #16

Closed
theqp opened this issue Oct 9, 2021 · 1 comment
Closed

Add compose #16

theqp opened this issue Oct 9, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@theqp
Copy link

theqp commented Oct 9, 2021

Function.compose(...fns);

const { compose } = Function;

const f = compose(f0, f1, f2);
f(5, 7); // f0(f1(f2(5, 7))).

const g = compose(g0);
g(5, 7); // g0(5, 7).

const h = compose();
h(5, 7); // 5.
Precedent Example
[lodash][] _.flowRight
[Ramda][] R.compose
@theqp
Copy link
Author

theqp commented Oct 9, 2021

I found out compose is intentionally left out #5

@theqp theqp closed this as completed Oct 9, 2021
@js-choi js-choi added the duplicate This issue or pull request already exists label Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants