Consider the following straightforward implementation of a list in latex:

```
\newcommand{\add@to@list}[2]{%
  \ifx#2\@empty%
    \xdef#2{#1}%
  \else%
    \xdef#2{#2,#1}%
  \fi%
}%

```

I wonder if there is a simple way to implement a set (list with no repeated elements) ?