diff --git a/src/Control/Monad/ToolsYj.hs b/src/Control/Monad/ToolsYj.hs
--- a/src/Control/Monad/ToolsYj.hs
+++ b/src/Control/Monad/ToolsYj.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE BlockArguments #-}
 {-# OPTIONS_GHC -Wall -fno-warn-tabs #-}
 
 module Control.Monad.ToolsYj where
@@ -16,3 +17,8 @@
 
 doWhile_ :: Monad m => m Bool -> m ()
 doWhile_ a = fix $ (a >>=) . bool (pure ())
+
+doWhile :: Monad m => a -> (a -> m (Bool, a)) -> m a
+doWhile v0 a = ($ v0) $ fix \go v -> do
+	(c, v') <- a v
+	if c then go v' else pure v'
diff --git a/tools-yj.cabal b/tools-yj.cabal
--- a/tools-yj.cabal
+++ b/tools-yj.cabal
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           tools-yj
-version:        0.1.0.39
+version:        0.1.0.40
 synopsis:       Tribial tools
 description:    Please see the README on GitHub at <https://github.com/YoshikuniJujo/tools-yj#readme>
 category:       Tools
