
16 Feb
2011
16 Feb
'11
5:48 p.m.
On Wednesday 16 February 2011 23:13:10, Max Bolingbroke wrote:
On 16 February 2011 21:51, Andrew Coppin
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[_].