Skip to content

Instantly share code, notes, and snippets.

@athas
Created September 22, 2020 08:53
Show Gist options
  • 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