Mercurial > repo
view test.hs @ 3129:c8868d1bc0fb
<L8D> fetch https://github.com/L8D/delvs/raw/master/samples/hi-bool.bf
author | HackBot |
---|---|
date | Sun, 16 Jun 2013 06:25:14 +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