Proposal: Adding Kleisli composition to Control.Monad

roconnor at roconnor at
Mon Nov 13 07:26:50 EST 2006

I think that both repeatM and repeatM_ should be added for the following 

1. sequence . repeat and sequence_ . repeat are the only specifications 
that will ever be meant by the names repeatM and repeatM_ (in 
Control.Monad), so there is no concern for conflict or confusing with 
these names.

2. the implemention are exteremely short, so there is negligable harm in 
including them in distributions.

3. repeatM seems plausibly useful in at least the reader monad, and 
probably others.

That being said, I also think it is a fine idea to add the forever 
function.  Haskell thrives on multiple ways of doing the same thing. 
Giving users reasonable set of options is a good thing.

Russell O'Connor                                      <>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''

More information about the Libraries mailing list