Skip to content

Instantly share code, notes, and snippets.

@mrosata
Created November 19, 2016 16:08
Show Gist options
  • Select an option

  • Save mrosata/41830f366433b4211a4bdbb2f3edb5b1 to your computer and use it in GitHub Desktop.

Select an option

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
// 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