Created
January 10, 2017 09:38
-
-
Save danielpetrov/fa0e8643e29641219a82322c186992da 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 = () => { | |
const fns = arguments | |
return result => { | |
for (var i = fns.length - 1; i > -1; i--) { | |
result = fns[i].call(this, result) | |
} | |
return result | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment