Created
November 11, 2017 05:14
-
-
Save rauschma/985d6fda6227bed5599f5f67764d6933 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
function curry2(func) { | |
return function (...args) { | |
if (args.length < 2) { | |
return func.bind(this, ...args); | |
} | |
return func.apply(this, args); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@rauschma That would make it much easier with the current implementation of Typescript:
Example