Created
April 23, 2019 12:13
-
-
Save joeynimu/0fb03d1e29c871af8875db51dd5fc56c to your computer and use it in GitHub Desktop.
JS Utility Functions
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
// a function that composes any number of functions | |
const compose = (..fns) => x => fns.reduceRight((acc, fn) => fn(acc), x); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment