Created
August 14, 2018 23:08
-
-
Save aledwassell/4d68f0cffd32dd85f407ddcb7a87f5d7 to your computer and use it in GitHub Desktop.
Currying concept
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
let myCurrier = (greeting) => { | |
return (name) => { | |
console.log(`${greeting} ${name}`) | |
} | |
} | |
let instance = myCurrier('Hello'); | |
instance('Jack'); | |
instance('Dave'); | |
instance('Mike'); | |
instance('Sharon'); | |
instance('Paddy'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment