title: Find unique elements in a list in OCaml
body: <p>I am working on a project with OCaml and there are some problems regarding to arrays that I am not sure with. I am not allowed to use the List module, so please give me some idea or suggestion with my works.</p>
  
  <p>First, I already implemented a function <code>'a list -&gt; 'a list</code> called <code>uniq</code> that return a list of the uniq elements in an array, for example  <code>uniq [5;6;5;4] =&gt; [6;5;4]</code></p>
  
  <p>Here is my implementation:</p>
  
  <pre><code>let rec uniq x =
  let rec uniq_help l n = 
      match l with
          [] -&gt; []
      |   h :: t -&gt; uniq_help t, n if (n = h) else (h :: (uniq_help(t, n)))
  match x with
      [] -&gt; []
  |   h::t -&gt; uniq_help t, h
  ;;
  </code></pre>
  
  <p>I mot sure this is a correct implementation, can someone give me some suggestion or correctness?</p>