Compose-Function
Installation |
Usage |
Related |
License
logo by Justin Mezzell
Compose a new function from smaller functions `f(g(x))`
Installation
npm install compose-function
Usage
Basic usage
; const composition = ; // sqr(add2(x)) // => 16 2; // => 92; // => 5
with curry
;; const add = x + y; // add(6, sqr(add(2, x))); // map(filter(list, even), sqr)12345678 // => [4, 16, 36, 64]
::
huh?
If you’re wondering what the ::
thing means, you’d better read this excellent overview by @jussi-kalliokoski or have a look at the function bind syntax proposal.
Or checkout the curry-this docs.
Related
License
MIT © Christoph Hermann