Copyright | (c) Alexandre Joannou 2020-2021 |
---|---|
License | MIT |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Blarney.Misc.MonadLoops
Description
This module provides monadic loop helpers non present in base. Inspired by Control.Monad.Loops
Documentation
untilPredM :: Monad m => m a -> (a -> Bool) -> m [a] infixr 0 Source #
Repeat computation until a predicate holds
untilPredM_ :: Monad m => m a -> (a -> Bool) -> m () infixr 0 Source #
Same as untilPredM
but discard the final result