Safe Haskell | Safe-Inferred |
---|
- withJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m Bool
- untilNothing :: Monad m => m (Maybe a) -> (a -> m ()) -> m Bool
Documentation
withJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m Bool
If the monad retuns a Just, runs the function on its contents. Returns True if the action was executed.
untilNothing :: Monad m => m (Maybe a) -> (a -> m ()) -> m Bool
Runs the monadic action as long as the producer returns Justs. Returns True if the action was ever executed.