title: intersection of n lists via JS
body: <p>I am working on an algorithm and trying to figure out how to solve it given the following information:</p>
  
  <ol>
  <li>I would like to find the intersection between n number of lists</li>
  <li>assume that I have a (properly working) intersection(a, b) function</li>
  <li>assume that the intersection() only takes two lists as input</li>
  </ol>
  
  <p>So the problem would look something like this:</p>
  
  <pre><code>var a = {1, 2, 'b'}; 
  var b = {2, 'b', 'b'};
  var c = {2, 'b', 'c'};
  var d = {'a', 'b', 'c'};
  
  //this is the part that does not work, of course:
  function intersect_all(d)
  {
      //what goes in here???        
  }
  </code></pre>
  
  <p>Note:  I don't want to use python for this, since python has methods built into the lang that are not available for my app (or js, for that matter).  I would like to solve it using the above information.  </p>
  
  <p>The result should look something like</p>
  
  <pre><code>{2, 'b'}
  </code></pre>
  
  <p>jml</p>