changeset 3020:831ffc1f8007

<oerjan> fetch http://oerjan.nvg.org/test.hs
author HackBot
date Sat, 01 Jun 2013 19:31:48 +0000
parents 00c8fbc8aae9
children 56770c1d845d
files test.hs
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test.hs	Sat Jun 01 19:31:48 2013 +0000
@@ -0,0 +1,3 @@
+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