
19 Sep
2008
19 Sep
'08
7:43 a.m.
oleg@okmij.org writes:
It is interesting to compare the above main function with the corresponding lazy IO:
Minor point I know, but aren't you really comparing it with the corresponding *strict* IO?
main'' = do names <- getArgs files <- mapM readFile names ^^^^
print $ length $ words (concat files)
This works nicely if you replace the middle line with a lazy version, e.g.: files <- mapM (unsafeInterleaveIO . B.readFile) names -k -- If I haven't seen further, it is by standing in the footprints of giants