summaryrefslogtreecommitdiff
path: root/h8.hs
diff options
context:
space:
mode:
Diffstat (limited to 'h8.hs')
-rw-r--r--h8.hs12
1 files changed, 0 insertions, 12 deletions
diff --git a/h8.hs b/h8.hs
deleted file mode 100644
index 219bc93..0000000
--- a/h8.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-compress :: (Eq a) => [a] -> [a]
-compress = foldr elim []
- where elim e [] = [e]
- elim e ns
- | e == head ns = ns
- | otherwise = e:ns
-
-compress' xs = foldr f (const []) xs Nothing
- where
- f x r a@(Just q)
- | x == q = r a
- f x r _ = x : r (Just x)