[Haskell] Speed of ByteString.Lazy

Ketil Malde ketil+haskell at ii.uib.no
Thu Jun 29 18:10:18 EDT 2006

Robby Findler <robby at cs.uchicago.edu> writes:

> Just out of curiosity, did you try "wc -l"?

>> import qualified Data.ByteString.Lazy.Char8 as L
>> main = L.getContents >>= print . L.count '\n'

     import Data.ByteString (hGetLines)
     main = hGetLines IO.stdin >>= print . List.length

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell mailing list