Skip to content

Instantly share code, notes, and snippets.

@itzzmeakhi
Created January 11, 2022 09:08
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/e8148ce637cd4a6a08a7e0d42b09faad to your computer and use it in GitHub Desktop.
Save itzzmeakhi/e8148ce637cd4a6a08a7e0d42b09faad to your computer and use it in GitHub Desktop.
function multiply(a) {
return (b) => {
return a * b;
}
}
// Returns a function, which can be used with other set of parameters
const double = multiply(2);
// Using curried function with result, instead of passing same argument again and again.
const doubledResult = double(result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment