view test.hs @ 3069:119e98f68627

<boily> learn twh would help, but is an hth derivative. hth. twh. hand.
author HackBot
date Fri, 07 Jun 2013 15:47:23 +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