hw-prelude 0.0.4.3 → 0.0.4.4
raw patch · 2 files changed
+7/−1 lines, 2 files
Files
hw-prelude.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.4 name: hw-prelude-version: 0.0.4.3+version: 0.0.4.4 synopsis: Opinionated prelude library description: Opinionated prelude library. license: Apache-2.0
src/HaskellWorks/Control/Monad.hs view
@@ -2,6 +2,8 @@ ( whileM, unlessM, + whileNothingM,+ repeatNUntilM_, repeatNWhileM_, ) where@@ -17,6 +19,10 @@ unlessM act = do b <- act unless b $ unlessM act++whileNothingM :: Monad m => m (Maybe a) -> m a+whileNothingM act =+ act >>= maybe (whileNothingM act) pure -- | Repeat an action n times until the action returns True. repeatNUntilM_ :: ()