untilIO IO Bool IO IO untilIO cond action do val cond if val then retu

1
2
3
4
5
6
untilIO :: IO Bool -> IO () -> IO ()
untilIO cond action = do
val <- cond
if val
then return ()
else untilIO cond action