diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-08-20 14:47:15 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-08-20 14:47:15 +0200 |
commit | c36fd5a174ab74465b8562c5fb4fa69a25dfca79 (patch) | |
tree | cebd29dfb75e4713934a995ad13b957769194e7d /Utils.hs | |
parent | f8d264f2b18fccdc3b96d8fb66656128a25137f2 (diff) |
Fourth
Diffstat (limited to 'Utils.hs')
-rw-r--r-- | Utils.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,7 +1,13 @@ module Utils where +import Data.List +import Data.Maybe + uniq :: Eq a => [a] -> [a] uniq (a:b:cs) | a == b = uniq (b:cs) | otherwise = a : uniq (b:cs) uniq l = l + +contains :: Eq a => [a] -> a -> Bool +contains l v = isJust $ find (== v) l |