On Feb 15, 2011, at 6:05 PM, Daniel Fischer <daniel.is.fisc...@googlemail.com> 
wrote:

> On Tuesday 15 February 2011 23:29:39, Andrew Coppin wrote:
>> 
>> Ouch! 
>> 
>> I suppose what we could really do with is a combinator that runs a
>> monadic action N times, without actually constructing a list N elements
>> long in order to do so.
> 
> True enough. But I guess nobody¹ bothered yet because there are so many 
> possible designs and most of them are trivial to implement in a line or two 
> (so the pain of writing them repeatedly isn't bad enough).
> 
> ¹ Not quite true, there's the monad-loops package on hackage which provides 
> a handful of loops. But not the trivial nTimesDo.
> 

Doesn't Control.Monad.replicateM_ do exactly that?

-- James
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to