Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. uniqueOnly :: Eq a => [a] -> [a]
  2. uniqueOnly [] = []
  3. uniqueOnly (x:xs)
  4. | x `elem` xs = uniqueOnly (filter (/= x) xs)
  5. | otherwise = x : (uniqueOnly xs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement