Skip to content

Instantly share code, notes, and snippets.

@gdekefir
Created August 1, 2017 23:00
Show Gist options
  • Save gdekefir/d55425f36ecb1bd6a0cf38fa96840da4 to your computer and use it in GitHub Desktop.
Save gdekefir/d55425f36ecb1bd6a0cf38fa96840da4 to your computer and use it in GitHub Desktop.
Problem: Do any of these strings appear in another list? (point-free style)
// var overlaps = (spec, list) => !!find(contains(__, list), spec);
var overlaps = useWith(compose(Boolean, call), [flip(find), flip(contains)]);
var list = ['node', 'script.js', '-v']
overlaps(['-v', '--verbose'], list) //-> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment