Conveniently composes function with the This-Binding syntax.
Conveniently composes function with the This-Binding syntax.
This is a free-method version of compose
that applies the this
argument first, then the function it takes as argument. It's meant
to be used with the This-Binding Syntax proposal.
const then = compose.infix;
const inc = (x) => x + 1;
const double = (x) => x * 2;
inc::then(double)(2); // ==> 6
function(that) {
return compose(that, this);
}