Gamgine-0.5.1: Some kind of game library or set of utilities.

Safe HaskellSafe
LanguageHaskell98

Gamgine.Control

Synopsis

Documentation

whenM :: Monad m => m Bool -> m () -> m () Source #

ifJust :: Monad m => Maybe a -> (a -> m ()) -> m () Source #

if a is just than apply f, otherwise 'return ()'

applyIf :: (a -> Bool) -> (a -> a) -> a -> a Source #

apply f on a if p is true, otherwise just return a

applyIfM :: Monad m => (a -> Bool) -> (a -> m ()) -> a -> m () Source #

apply f on a if p is true, otherwise 'return ()'

(?) :: Bool -> a -> a -> a infixl 1 Source #