Created
August 1, 2017 22:59
-
-
Save gdekefir/f1bde4a9678058ead4c06b8a37ef4560 to your computer and use it in GitHub Desktop.
Problem: Do any of these strings appear in another list?
(point-free style)
This file contains 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
// 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