On Wednesday 16 February 2011 23:13:10, Max Bolingbroke wrote:
> On 16 February 2011 21:51, Andrew Coppin <[email protected]> 
wrote:
> > (Now, if only there was a version that feeds an integer to the monadic
> > action as well... Still, it's not hard to implement.)
>
> As simple as:
>   forM [1..x] mk_my_action
>

The problem with that is that under certain circumstances the list is 
shared in nested loops, which was what caused the thread (it was mapM_ and 
not forM_, but I'd be very surprised if they behaved differently with -O2).

What Andrew wants is a listless forM[_].

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to