Created
November 10, 2014 17:22
-
-
Save saevarb/4e58420af3e32956f91a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remdups :: Eq a => [a] -> [a] | |
remdups = | |
foldr rm [] | |
where | |
rm a [] = [a] | |
rm a (x:l) = | |
if a == x | |
then x:l | |
else a:x:l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment