Last active
May 18, 2018 12:27
-
-
Save larryyangsen/4dfc7759d5b2a0e7ee13686a5d7c993c 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 partial = (fn, ...args) => fn.bind(null, ...args); | |
const add3 = (a, b, c) => a + b + c; | |
const inc = partial(add3, 1, 2); | |
const result = inc(3); | |
console.log(result) //6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment