-
Notifications
You must be signed in to change notification settings - Fork 254
Closed
Labels
Milestone
Description
many times I ended up in writing following combinators, I think it would add some value if library has it :
- F<A, Bool> and(F<A, Bool> pred1, F<A, Bool> pred2)
- F<A, Bool> or(F<A, Bool> pred1, F<A, Bool> pred2)
- F < B, Bool > comap(F<B, A>, F<A, Bool>)
- F<B, Bool> notFor(F<B, A>, F<A, Bool>) [a la Haskell's Data.Function.Predicate's
isn't
] - F<A, Bool> inverse(F<A, Bool>)
additionally we could add:
nand, nor, xor
We can also implement Predicate2<A, B>, Predicate3<A, B, C> and so on.
thoughts?