Mercurial > repo
view test.hs @ 3020:831ffc1f8007
<oerjan> fetch http://oerjan.nvg.org/test.hs
author | HackBot |
---|---|
date | Sat, 01 Jun 2013 19:31:48 +0000 |
parents | |
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