News for hackers. Stuff that matters.
Re:Inventing Monads by dllthomas on Tuesday September 01, 2020 @05:01PM (#24347008)
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 || (== '_')`

There are no comments on this comment yet.