Add ifThenElse and (?) to Data.Bool
Henning Thielemann
lemming at henning-thielemann.de
Thu Nov 17 08:36:39 UTC 2016
On Thu, 17 Nov 2016, winter wrote:
> Ah Yeah, i see. It’s indeed a rare use case.
> From all your feedback, I guess i will make a package with (?) for someone who want to save keystrokes like me ;)
I use if' and (?:) from
https://hackage.haskell.org/package/utility-ht-0.0.12/docs/Data-Bool-HT.html
E.g. this is very handy:
if' (even n) "even" $
if' (isPrime n) "prime" $
"boring"
(?:) is the uncurried variant of (?). I do not see value in curried (?)
because I can just use `if'` then (which I never did).
More information about the Libraries
mailing list