Mercurial > repo
view test.hs @ 3123:0e357bf3dcb9
<L8D> rm bf.asm.txt master.tar.gz
author | HackBot |
---|---|
date | Sun, 16 Jun 2013 06:18:20 +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