while :: Monad m => m Bool -> m a -> m () while conde bodye = do cond <- conde if cond then bodye >> while conde bodye else return ()