Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
loopM :: Monad m => (a -> m (Either a b)) -> a -> m b Source #
A monadic version of loop
, where the predicate returns Left
as a seed
for the next loop or Right
to abort the loop.
https://hackage.haskell.org/package/extra-1.6.15/docs/src/Control.Monad.Extra.html#loopM