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
### Keybase proof | |
I hereby claim: | |
* I am paddyo on github. | |
* I am paddyo (https://keybase.io/paddyo) on keybase. | |
* I have a public key ASB9Lq1I_WPQFEoQ3jNJqG67GL20m4_ZG2gNO8GvtKHtjAo | |
To claim this, I am signing this object: |
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 curry(fn, args = []) { | |
return function(...x) { | |
let argsn = [...args, ...x]; | |
if(argsn.length >= fn.length) { | |
return fn(...argsn); | |
} | |
return curry(fn, argsn); | |
} | |
} |