if-then-else as function.
Example:
if' (even n) "even" $
if' (isPrime n) "prime" $
"boring":: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Moduleutility-ht-0.0.17.2Haskell98
if-then-else as function.
Example:
if' (even n) "even" $
if' (isPrime n) "prime" $
"boring"The same as if', but the name is chosen such that it can be used for GHC-7.0's rebindable if-then-else syntax.
From a list of expressions choose the one, whose condition is true.
Example:
select "boring" $
(even n, "even") :
(isPrime n, "prime") :
[]Like the ? operator of the C progamming language.
True ?: ("yes", "no")"yes"False ?: ("yes", "no")"no"
Logical operator for implication.
Funnily because of the ordering of Bool it holds:
\a b -> implies a b == (a<=b)