hw-prelude-0.0.5.0: Opinionated prelude library
Safe HaskellNone
LanguageHaskell2010

HaskellWorks.Control.Monad

Synopsis

Documentation

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

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

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

repeatNUntilM_ :: Monad m => Int -> (Int -> m Bool) -> m () Source #

Repeat an action n times until the action returns True.

repeatNWhileM_ :: Monad m => Int -> (Int -> m Bool) -> m () Source #

Repeat an action n times while the action returns True.