Allows you to quantify List, Set, Dict or a single value according to a predicate, by returning a Quantifier
:
type Quantifier
= None
| Some
| All
isEven : Int -> Bool
isEven number =
modBy 2 number == 0
Quantify.list isEven [1,3,5,7]
--> None
Quantify.list isEven [1,2,3,4]
--> Some
Quantify.list isEven [2,4,6,8]
--> All
Feedback and contributions to both code and documentation are very welcome.
$ elm install GlobalWebIndex/quantify