Skip to content

Instantly share code, notes, and snippets.

@itzzmeakhi
Created January 11, 2022 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itzzmeakhi/a458c3212fb06ee85b9f6f74fbc5b133 to your computer and use it in GitHub Desktop.
Save itzzmeakhi/a458c3212fb06ee85b9f6f74fbc5b133 to your computer and use it in GitHub Desktop.
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