F# deleting common elements in lists
<p>I'm trying to make a list with only one copy of each element of the original list.</p>

<p>For example [1;2;3;3;2] would be [1;2;3] or ["hi";"the";"world";"hi"] would be ["hi";"the";"world"]</p>

<p>I'm using recursion and pattern matching, and not using the list modules.</p>

<p>Here is my attempt and thinking: I want to go through the list and look at the head, and if that element exists in the tail of the list, then I want to take that element and then remove that element from the existing list</p>

<pre><code>let rec common l =
  match l with
  | head :: tail -&gt; if head = tail then head :: [] else head :: isolate(tail)
  | [] -&gt; []
</code></pre>