Mercurial > repo
view test.hs @ 3081:cc39dc26b7b9
<kmc> addquote <Sgeo> That think you podded doesn\'t have any pod :psyduck:
author | HackBot |
---|---|
date | Mon, 10 Jun 2013 03:38:24 +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