title: Union of two lists in order f#
body: <p>I have this code that unites two lists:</p>
  
  <pre><code>let rec union list1 list2 =
      match list2 with
      | [] -&gt; list1
      | x::xs when mem x list1 -&gt; union list1 xs
      | x::xs -&gt; x::(union list1 xs)
  </code></pre>
  
  <p>However, this doesn't give me the result I would like; I want the result to be in order with the smallest first. How would I go about doing this?</p>