
16 Nov
2014
16 Nov
'14
4:47 a.m.
On Sat, Nov 15, 2014 at 06:50:26AM +0800, zhangjun.julian wrote:
In the master branch I had a list file to read, so I use mapM_ to call rCount as blow
mapM_ (\(x,y) -> rCount num readhandle1 x y) handlePairList
If I change my Map to Strict and call rCount directly( don’t use mapM_ ) the memory will not swell.
I can understand why lazy Map will cause swell, but I don’t know why mapM_ will cause swell? Does the mapM_ is lazy too? Any strict alternative I can use?
I think you need to provide us with more details about exactly what this mapM_ is doing.