Created
November 7, 2016 18:50
-
-
Save edtsech/a7e7d9f32aefd29528875538d90fe6fe 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
rightCurry = function (f) { | |
let args = Array.prototype.slice.call(arguments).slice(1); | |
return function(firstArg) { | |
return f.apply(null, [firstArg].concat(args)) | |
} | |
} | |
fullName = function (name, middleName, lastName) { return name + " " + middleName + " " + lastName } | |
// rightCurry(fullName, "David", "Doe")("John") -> "John David Doe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment