Created
August 22, 2016 15:19
-
-
Save venil7/4182d3fca6561a360ba36c23d9eb2623 to your computer and use it in GitHub Desktop.
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 compose = (...funcs) => { | |
| const noop = (arg) => arg; | |
| return funcs.reduceRight((acc, func) => { | |
| return (arg) => func(acc(arg)); | |
| }, noop); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment