Mercurial > repo
view test.hs @ 3083:fe9e612a6ec5
<elliott> learn fizzie is the creator of Minecraft.
author | HackBot |
---|---|
date | Tue, 11 Jun 2013 12:32:15 +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