summaryrefslogtreecommitdiff
path: root/h11.hs
diff options
context:
space:
mode:
Diffstat (limited to 'h11.hs')
-rw-r--r--h11.hs15
1 files changed, 0 insertions, 15 deletions
diff --git a/h11.hs b/h11.hs
deleted file mode 100644
index 77b7295..0000000
--- a/h11.hs
+++ /dev/null
@@ -1,15 +0,0 @@
-import Control.Arrow
-import Data.List
-
-data ListItem a = Single a | Multiple a Int
- deriving (Show)
-
-encode :: Eq a => [a] -> [(a,Int)]
-encode xs = map (head &&& length) $ group xs
-
-encodeModified :: Eq a => [a] -> [ListItem a]
-encodeModified = map helper . encode
- where
- helper (a,1) = Single a
- helper (a,c) = Multiple a c
-