Over the winter, I have been refining a Haskell library of functions
for doing Applicative Logic. The idea is that a lot of functions
involving booleans can be generalised to work on any Applicative Functor
(possibly applied to Monoids), through the isomorphism
Bool ≃ Maybe ()
– where Maybe
is the
applicative functor and ()
is the monad.
There is a more complete write-up here on my website, and I have put the library on Hackage. There is also a discussion thread on r/haskell under the heading “A boolean is maybe true”. I was happy that some people got the point, and there was even a link to my write-up in Haskell Weekly.
Expecting a comment section? Feel free to e-mail me your comments, or otherwise contact me to discuss the content of this site. See my contact info. You can also write your opinion on your own website, and link back here! ☺