title: How do I intersect two lists in OCaml?
body: <p>When I have two lists in OCaml, for example</p>
  
  <pre><code>e1 = [3; 4; 5; 6; 7]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>e2 = [1; 3; 5; 7; 9]
  </code></pre>
  
  <p>Is there an efficient way to get the intersection of those two lists?
  I.e.:</p>
  
  <pre><code>[3; 5; 7]
  </code></pre>
  
  <p>Because I don't like scanning every element in list e2 for every element in list e1, thus creating a big Oh of order n^2.</p>