Mercurial > repo
view test.hs @ 3072:f287bdcbfcd2
<hagb4rd> pastelogs ching
author | HackBot |
---|---|
date | Sat, 08 Jun 2013 11:44:40 +0000 |
parents | 831ffc1f8007 |
children |
line wrap: on
line source
import Data.Maybe (catMaybes) import Data.List (group, sort, stripPrefix) main = mapM_ putStrLn . map (\s -> head s ++ " occurs->" ++ show (length s)) . group . sort . catMaybes . map (stripPrefix "username:" . (!!2) . words) . lines =<< getContents