Created
November 19, 2016 16:08
-
-
Save mrosata/41830f366433b4211a4bdbb2f3edb5b1 to your computer and use it in GitHub Desktop.
Getting Curried Away - example 1b - Full Gist at https://gist.github.com/mrosata/35e4d80c2b393267a4069fbf045e22a7
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
| // If baristaJoe was a curried function, we could create more specific functions | |
| // by "partially applying" an argument at a time. | |
| const farmhouse = baristaJoe('farmhouse blend'); | |
| const columbian = baristaJoe('columbian'); | |
| const arrrrrggg = baristaJoe('half-caff carmel-mocha pumkin-karaoke'); | |
| const farmhouseLight = farmhouse(10); | |
| const farmhouseBlack = farmhouse(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment