Skip to content

Instantly share code, notes, and snippets.

@haingdc
Created March 13, 2018 04:57
Show Gist options
  • Save haingdc/126e4b710cb23ece8ecbff9fe3477166 to your computer and use it in GitHub Desktop.
Save haingdc/126e4b710cb23ece8ecbff9fe3477166 to your computer and use it in GitHub Desktop.
A Gentle Introduction to Functional JavaScript: Part 3
var addTweedleClass = partialFirstOfTwo(addClass, 'tweedle');
var addBoyClass = partialFirstOfTwo(addClass, 'boy');
var ids = ['DEE', 'DUM'];
var elements = map(document.getElementById.bind(document), ids);
elements = map(addTweedleClass, elements);
elements = map(addBoyClass, elements);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment