Created
August 1, 2017 23:00
-
-
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)
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