Created
June 23, 2019 08:02
-
-
Save technikhil314/0091eddae21dee931863b7fa0677396c to your computer and use it in GitHub Desktop.
nth level of curry for multiply
This file contains hidden or 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 mul(val1) { | |
if(val1) { | |
return (val2) => { | |
if(val2) { | |
return mul(val1*val2); | |
} else { | |
return val1; | |
} | |
} | |
} else { | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment