view test.hs @ 3077:a8c8217fb02e

<shachaf> sed -i \'s/@/1/g\' bin/olist
author HackBot
date Sun, 09 Jun 2013 09:55:39 +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