Skip to content

Instantly share code, notes, and snippets.

@maruks
Created February 25, 2017 12:31
Show Gist options
  • Save maruks/14b0ef10224e7f22d40c04c8fea731ec to your computer and use it in GitHub Desktop.
Save maruks/14b0ef10224e7f22d40c04c8fea731ec to your computer and use it in GitHub Desktop.
nub([]) ->
[];
nub([X|Xs]) ->
[X | nub (lists:filter(fun (E) -> E =/= X end, Xs)].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment