-
-
Save itzzmeakhi/e8148ce637cd4a6a08a7e0d42b09faad 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) { | |
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