utility-ht-0.0.5.1: Various small helper functions for Lists, Maybes, Tuples, FunctionsSource codeContentsIndex
Data.Bool.HT
Synopsis
if' :: Bool -> a -> a -> a
select :: a -> [(Bool, a)] -> a
(?:) :: Bool -> (a, a) -> a
implies :: Bool -> Bool -> Bool
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
(?:) :: Bool -> (a, a) -> aSource
Like the ? operator of the C progamming language. Example: bool ?: (yes, no).
implies :: Bool -> Bool -> BoolSource

Logical operator for implication.

Funnily because of the ordering of Bool it holds implies == (<=).

Produced by Haddock version 2.6.0