yjtools-0.9.7: some tools for Monad, List, Tuple and so on.

Control.Monad.Tools

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

whenM, 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

filterM :: Monad m => (a -> m Bool) -> [a] -> m [a]Source

skipRet :: Monad m => m b -> a -> m aSource