-- | Extra functions for dealing with Bool. module Data.Bool.Extra (bool ,cond) where -- | An if/else condition on the given value. bool :: a -> a -> Bool -> a bool false true p = if p then true else false -- | An if/else condition on the given value. cond :: (a -> b) -> (a -> b) -> (a -> Bool) -> a -> b cond false true p v = if p v then true v else false v