Last active
November 29, 2017 21:01
-
-
Save andrIvash/936e5ab2f4e10cc72da806bcef149c54 to your computer and use it in GitHub Desktop.
js-samples
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
| function func (...arg) { | |
| return (init) => { | |
| return arg.reduce((res, fn) => { | |
| return fn(res) | |
| }, init); | |
| } | |
| } | |
| var summ = func((a) => a+1, (b)=> b+2,(c) => c+3)(2); | |
| console.log(summ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment