Safe Haskell | Safe-Infered |
---|
Data.Bool.HT
Documentation
if' :: Bool -> a -> a -> aSource
if-then-else
as function.
Example:
if' (even n) "even" $ if' (isPrime n) "prime" $ "boring"
select :: a -> [(Bool, a)] -> aSource
From a list of expressions choose the one, whose condition is true.
Example:
select "boring" $ (even n, "even") : (isPrime n, "prime") : []