diff options
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 |