Last active
August 29, 2015 14:11
-
-
Save manishtomar/dd5006ddbc5f6be8f5e9 to your computer and use it in GitHub Desktop.
Combining predicates
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
all_preds :: [a -> Bool] -> a -> Bool | |
all_preds ps = \x -> and $ map (\p -> p x) ps | |
any_preds :: [a -> Bool] -> a -> Bool | |
any_preds ps = \x -> or $ map (\p -> p x) ps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment