How to compose JavaScript functions that take multiple parameters (the epic guide)
Briefly

Only unary functions compose. Any more than one argument and composition doesn't work. We can't compose functions that take more than one parameter.
We work around the limitation by changing our functions. We transform our multi-argument functions into unary functions. In this article, we'll look at five techniques for doing that.
Suppose we have one function that needs two arguments. We also have another function that returns two values. Functions can't return multiple values. Each function can return exactly one value.
Read at Jrsinclair
[
add
]
[
|
|
]