Created
April 8, 2017 02:52
-
-
Save hkjpotato/3b3b74de2c44c9aab7464a55331d4a4a 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
function fn2() { | |
var preset = Array.prototype.slice.call(arguments); | |
/* | |
originally: | |
return fn.bind(null, ...arguments); | |
*/ | |
return function helper() { | |
var added = Array.prototype.slice.call(arguments); | |
return fn2.apply(null, [...preset, ...added]); //for simplity, use es6 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment