From a9abc1da41b56edbed00081800382e854d6698d0 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Tue, 31 Mar 2015 23:41:55 +0800 Subject: rename to H**, +31 +32 +33 +34 +35 +36 --- h11.hs | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 h11.hs (limited to 'h11.hs') 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 - -- cgit v1.2.3-70-g09d2