
11 Sep
2013
11 Sep
'13
2:34 a.m.
On Tue, 10 Sep 2013, Oliver Charles wrote:
Hello,
I would like to propose that the following is added to Data.Bool in base:
bool :: a -> a -> Bool -> a bool f _ False = f bool _ t True = t
(Aka, bool f t b = if b then t else f)
There is already the ifThenElse function (and I have if' in utility-ht). Their argument order is optimal for writing kinds of 'case': http://www.haskell.org/haskellwiki/Case But 'bool' would be consistent with 'maybe' and 'either' and should be in Data.Bool, not Prelude.