monad-loops
monad-loops copied to clipboard
Suggesting functions repeatM
I find the following functions useful that are currently not in the package. They are useful for building simple interactive loops.
repeatM :: Monad m => m a -> m [a]
repeatM = sequence . repeat
repeatM_ :: Monad m => m a -> m ()
repeatM_ = sequence_ . repeat