on master help sign in
update line length histogram section
3f60343Harendra Kumar
README.md+4−1
@@ -472,6 +472,9 @@ main = withArg avgll >>= print
472
472
473### Line Length Histogram
473### Line Length Histogram
474
474
475+`classify` is not released yet, and is available in
476+`Streamly.Internal.Data.Fold`
477+
475``` haskell
478``` haskell
476llhisto =
479llhisto =
477 S.fold (FL.classify FL.length)
480 S.fold (FL.classify FL.length)
@@ -480,7 +483,7 @@ llhisto =
480 . S.unfold FH.read
483 . S.unfold FH.read
481
484
482 where
485 where
483− bucket n = let i = n `div` 10 in if i > 9 then (9,n) else (i,n)
486+ bucket n = let i = n `mod` 10 in if i > 9 then (9,n) else (i,n)
484
487
485main = withArg llhisto >>= print
488main = withArg llhisto >>= print
486```
489```