annotate test.hs @ 3096:8f79561a34c2

<nooodl> pastelogs shachaf.*coyoneda
author HackBot
date Wed, 12 Jun 2013 11:13:32 +0000
parents 831ffc1f8007
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3020
831ffc1f8007 <oerjan> fetch http://oerjan.nvg.org/test.hs
HackBot
parents:
diff changeset
1 import Data.Maybe (catMaybes)
831ffc1f8007 <oerjan> fetch http://oerjan.nvg.org/test.hs
HackBot
parents:
diff changeset
2 import Data.List (group, sort, stripPrefix)
831ffc1f8007 <oerjan> fetch http://oerjan.nvg.org/test.hs
HackBot
parents:
diff changeset
3 main = mapM_ putStrLn . map (\s -> head s ++ " occurs->" ++ show (length s)) . group . sort . catMaybes . map (stripPrefix "username:" . (!!2) . words) . lines =<< getContents