summaryrefslogtreecommitdiff
path: root/src/Util.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2019-10-12 21:42:49 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2019-10-12 21:42:49 +0200
commit1aef7681082e411c135802881ebcd3ffd0168fcd (patch)
tree3d842462246265323161755fb49dba532bd44827 /src/Util.hs
parent61b04eb5fda0d1e94f673ad1c11f328a318bb09d (diff)
Shared state and identity update
Diffstat (limited to 'src/Util.hs')
-rw-r--r--src/Util.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Util.hs b/src/Util.hs
new file mode 100644
index 0000000..99d51f6
--- /dev/null
+++ b/src/Util.hs
@@ -0,0 +1,6 @@
+module Util where
+
+uniq :: Eq a => [a] -> [a]
+uniq (x:y:xs) | x == y = uniq (x:xs)
+ | otherwise = x : uniq (y:xs)
+uniq xs = xs