yjtools-0.4: some tools for Monad

Control.Monad.Utils

ifM :: Monad m => m Bool -> m a -> m a -> m aSource

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

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

doWhile_ :: Monad m => m Bool -> m ()Source

doWhile :: Monad m => a -> (a -> m (a, Bool)) -> m aSource

for_ :: Monad m => a -> (a -> Bool) -> (a -> a) -> (a -> m b) -> m ()Source

for :: Monad m => a -> (a -> Bool) -> (a -> a) -> b -> (a -> b -> m b) -> m bSource