That's interesting. Usually I write:
repeatM_ ::Monad m => m a -> m ()
repeatM_ a = a >> repeatM_ a
maybe that is more appropriate?
sof:
>
> Does that impl of 'repeatM' come with stack overflowing guarantees? ;-)
>
> --sigbjorn
>
> Donald Bruce Stewart wrote:
> >Also often used. Particularly nice in forkIO code.
> >
> >Ross, should this be extended into Foldable et al too?
> >
> >-- Don
> >
> >------------------------------------------------------------------------
> >
> >
> >New patches:
> >
> >[Add Control.Monad.{repeatM,repeatM_}
> >Don Stewart <[EMAIL PROTECTED]>**20060830141256
> >
> > Another oft-requested control structure:
> >
> > repeatM :: (Monad m) => m a -> m [a]
> > repeatM = sequence . repeat
> >
> > repeatM_ :: (Monad m) => m a -> m ()
> > repeatM_ = sequence_ . repeat
> >
> >]
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc