Proposal: Add bool to Data.Bool

Liyang HU haskell.org at liyang.hu
Mon Sep 16 02:41:51 CEST 2013


+1 for bool sans bikeshedding, à la maybe and either.

Christopher Done <chrisdone <at> gmail.com> writes:
> +1 I use:bool :: (a -> b) -> (a -> b) -> (a -> Bool) -> a -> b

This "bool ft ff fb" is just "join (bool ft ff . fb)" using the non-
bikeshedded 'bool'. Or "bool <$> ft <*> ff <*> fb" as others have pointed 
out.




More information about the Libraries mailing list