Overloaded versions of replicateM and replicateM_ for any Integral type: genericReplicateM :: (Monad m, Integral i) => i -> m a -> m [a] genericReplicateM n = sequence . genericReplicate n genericReplicateM_ :: (Monad m, Integral i) => i -> m a -> m () genericReplicateM_ n = sequence_ . genericReplicate n --ken