Skip to content

Instantly share code, notes, and snippets.

@athas
Created September 22, 2020 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save athas/c5d95054e9ac86713aee89e525283835 to your computer and use it in GitHub Desktop.
Save athas/c5d95054e9ac86713aee89e525283835 to your computer and use it in GitHub Desktop.
fun nub [] = []
| nub [x] = [x]
| nub (x::y::xs) = if x = y
then nub (x::xs)
else x :: nub (y::xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment