> 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

If I haven't seen further, it is by standing in the footprints of giants
Haskell-Cafe mailing list

Reply via email to