Last active
May 3, 2017 17:10
-
-
Save thephilip/3db73bc7bd29592329d4c3a9c7e7bd6d to your computer and use it in GitHub Desktop.
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
// using bind() | |
const partialBind = (fn, ...args) => { | |
return fn.bind(null, ...args); | |
}; | |
// with a closure | |
const partial = (fn, ...args) => { | |
return (...moreArgs) => { | |
return fn(...args, ...moreArgs) | |
}; | |
}; | |
// curried | |
const partialCurried = fn => ...args => { | |
// see: partialCurried.js | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment