-- * Miscellaneous

-- | Apply the function if condition holds, otherwise use default value.
applyIf :: Bool -> (a -> a) -> a -> a
applyIf b f x = if b then f x else x
applyIf :: Bool -> (a -> a) -> a -> a
applyIf b f x = if b then f x else x
applyIf b f x = if b then f x else x