Created
May 1, 2018 15:19
-
-
Save redbug312/ed954151416c3293f271d0e6f46e5494 to your computer and use it in GitHub Desktop.
FLOLAC'18 prerequisite p1
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 [] = [] | |
nub [x] = [x] | |
nub (x:xs) = if x `elem` xs then nub xs else x : nub xs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment