-
-
Save itzzmeakhi/a458c3212fb06ee85b9f6f74fbc5b133 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 multiply(a, b) { | |
return a * b; | |
} | |
// Generally, we will call the above function as multiply(1, 2) | |
// Lets make this function as a curried one | |
function multiply(a) { | |
return (b) => { | |
return a * b; | |
} | |
} | |
// We can call the curried multiply function as follows | |
// multiply(1)(2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment