# [Haskell], 33 bytes

<!-- language-all: lang-hs -->

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

[Try it online!][TIO-ji32so4g] Port of my [Husk answer](https://codegolf.stackexchange.com/a/166298/56433).

[Haskell]: https://www.haskell.org/
[TIO-ji32so4g]: https://tio.run/##y0gszk7NyfmvnJKalpmXqpCmEPM/rzRJT0MjJkbTRssOyNbkyswtyC8qUXBJLEnU88ksLvmfm5iZp2CrUFCUmVeioKKgkaapEG2oY6RjqGMMJI1i//9LTstJTC/@rxvhHBAAAA "Haskell – Try It Online"

____

### [Haskell], 50 bytes

<!-- language-all: lang-hs -->

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

[Try it online!][TIO-ji32ymgi] Alternative without imports.

[Haskell]: https://www.haskell.org/
[TIO-ji32ymgi]: https://tio.run/##y0gszk7NyfmfpmCrEPNfIzpWWZMrUVmjwqpI01YjuqImMa9Sw9a2QrNIJzEnR0MfyEqM1dZO1FQuAiqLt038n5uYmQfUW1CUmVeioKKQphBtqGOkY6hjDCSNYv//S07LSUwv/q8b4RwQAAA "Haskell – Try It Online"