Last active
April 26, 2018 18:29
-
-
Save terry182/3f31de2b19c66db208d84afafa539ec9 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
nub' :: [Int] -> [Int] | |
nub' (x:xs) | elem x xs = nub' xs | |
| otherwise = x:(nub' xs) | |
nub' [] = [] | |
nub = reverse . nub' . reverse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment