Last active
May 5, 2018 20:14
-
-
Save Matt-Jensen/b96ef7d7da5aa915b46952a95fdfce62 to your computer and use it in GitHub Desktop.
Simple pipe utility helper via: https://medium.com/javascript-scene/reduce-composing-software-fe22f0c39a1d
This file contains 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
export default (...fns) => x => fns.reduce((v, f) => f(v), x); | |
// pipe(double, add1)(2) === 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment