summaryrefslogtreecommitdiff
path: root/p8.hs
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2015-03-17 11:05:29 +0800
committerJoe Zhao <ztuowen@gmail.com>2015-03-17 11:05:29 +0800
commita9ee47b61558efe09aee23f5671aabd0c3747e8a (patch)
tree52426053545a54514d39300e2117bdda14a9b1ef /p8.hs
parent11a5fd38018498a7b7feb0e392ac36003b0440ac (diff)
downloadh99-a9ee47b61558efe09aee23f5671aabd0c3747e8a.tar.gz
h99-a9ee47b61558efe09aee23f5671aabd0c3747e8a.tar.bz2
h99-a9ee47b61558efe09aee23f5671aabd0c3747e8a.zip
p -> h
Diffstat (limited to 'p8.hs')
-rw-r--r--p8.hs12
1 files changed, 0 insertions, 12 deletions
diff --git a/p8.hs b/p8.hs
deleted file mode 100644
index 219bc93..0000000
--- a/p8.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)