Last active
December 4, 2016 02:49
-
-
Save bayleedev/5e70136d1f517f917323c110aa522c35 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 list() { | |
return Array.prototype.slice.call(arguments); | |
} | |
function bind(thisArg, arg1) { | |
return function() { | |
return thisArg(...[arg1, ...arguments]) | |
}; | |
} | |
var leadingThirtysevenList = bind(list, 37) | |
console.log(leadingThirtysevenList(1, 2, 3)) // [37, 1, 2, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment