3 ms·
I'll occasionally hide the monomorphic && and define something like: class Predicate a where (&&) :: a -> a -> a not :: a -> a etc
by dllthomas 6y ago
I'll occasionally hide the monomorphic && and define something like:
class Predicate a where
(&&) :: a -> a -> a
not :: a -> a
etc :: ...
and then define the obvious instances for `Bool` and `Predicate b => a -> b`
It's really nice to be able to just write `(> 6) && even` or `isAlpha || (== '_')`