
21 Sep
2011
21 Sep
'11
5:04 a.m.
Tim Docker
mapM_ applyAction sas
Maybe you could try a lazy version of mapM? E.g., I think this would do it: import System.IO.Unsafe (unsafeInterleaveIO) : mapM' f = sequence' . map f where sequence' ms = foldr k (return []) ms k m m' = do { x <- m; xs <- unsafeInterleaveIO m'; return (x:xs) } -k -- If I haven't seen further, it is by standing in the footprints of giants