Skip to content

Instantly share code, notes, and snippets.

@kutyel
Created July 29, 2016 08:57
Show Gist options
  • Save kutyel/492b196a9946e48375bc62a6ce3d8d49 to your computer and use it in GitHub Desktop.
Save kutyel/492b196a9946e48375bc62a6ce3d8d49 to your computer and use it in GitHub Desktop.
Some useful currying examples!
const get = prop => obj => obj[prop];
array.map(get('key'));
const match = req => obj => Object.keys(req).every(key => Object.keys(obj).includes(key) && obj[key] === req[key]);
array.filter(match({'key': value}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment