Mercurial > repo
view test.hs @ 3059:8a371054e33d
<nooodl> sed -i \'s/ `words`/(`words`)/\' bin/thanks
author | HackBot |
---|---|
date | Wed, 05 Jun 2013 19:17:13 +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