title: Finding the intersect of two lists (SML / NJ)
body: <p>I have an iterative foldr function:</p>
  
  <pre><code>fun iterFold f v [] = v
   |   iterFold f v (x::xs) = iterFold f (f(v,x)) xs;
  </code></pre>
  
  <p>And a function that takes in a predicate and a list. The function compares the list to the predicate and returns true if there is a single occurrence.</p>
  
  <pre><code>fun exist3 p M = foldr( fn(x,y) =&gt; y orelse (p x)) false M
  </code></pre>
  
  <p>Using these two functions, I need to write a one-line function that returns the intersection of two lists. Any help or suggestions would be greatly appreciated!</p>