Skip to main content
1 of 2
Laikoni
  • 26.3k
  • 6
  • 52
  • 115

Haskell, 33 bytes

nub.((\\)<*>nub)
import Data.List

Try it online! Port of my Husk answer.


Haskell, 50 bytes

([]#)
a#(x:r)=([x|any(==x)r,all(/=x)a]++a)#r
a#_=a

Try it online! Alternative without imports.

Laikoni
  • 26.3k
  • 6
  • 52
  • 115