Created
April 13, 2019 13:15
-
-
Save fractalliter/9754e492d28e39f84fcc19e0be74c5ca to your computer and use it in GitHub Desktop.
Composition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const add = (...props) => props.reduce((a,b)=> a+b); | |
const mul = (...props) => props.reduce((a,b)=> a*b); | |
const composer = (f,...rest) => f(...rest); | |
composer(mul, add(1,mul(2,3)), 4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment