git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Remove duplicates : elem, notElem
c6d48a9Phil Freeman
prelude/prelude.purs−8
@@ -651,14 +651,6 @@ module Data.Array where
651 nubBy _ [] = []
651 nubBy _ [] = []
652 nubBy (==) (x:xs) = x : nubBy (==) (filter (\y -> not (x == y)) xs)
652 nubBy (==) (x:xs) = x : nubBy (==) (filter (\y -> not (x == y)) xs)
653
653
654− elem :: forall a. (Eq a) => a -> [a] -> Boolean
655− elem a (a' : as) | a == a' = true
656− elem a (_ : as) = a `elem` as
657− elem _ _ = false
658−
659− notElem :: forall a. (Eq a) => a -> [a] -> Boolean
660− notElem a as = not (a `elem` as)
661−
662 instance showArray :: (Show a) => Show [a] where
654 instance showArray :: (Show a) => Show [a] where
663 show xs = "[" ++ joinWith (map show xs) "," ++ "]"
655 show xs = "[" ++ joinWith (map show xs) "," ++ "]"
664
656