title: scala coursera functional programing assignment FunSets
body: <p>I have undergoing the functional programming course by martin odersky in scala on coursera. 
  <br>
  However, I am unable to understand the solutions to the 2nd Assignment Funsets.scala. </p>
  
  <pre><code>type Set = Int =&gt; Boolean
  
    /**
     * Indicates whether a set contains a given element.
     */
    def contains(s: Set, elem: Int): Boolean = s(elem)
  
    /**
     * Returns the union of the two given sets,
     * the sets of all elements that are in either `s` or `t`.
     */
    def union(s: Set, t: Set): Set = (e: Int) =&gt; s(e) || t(e)
  </code></pre>
  
  <p><strong>Question</strong> In the above <strong>function what is e</strong> ? Where does it come from ? I know that the union function combines the two sets, but here what I understood from the method definition is that it takes 2 sets as input and returns the resulting union set, so where does <strong>e</strong> come from ?</p>
  
  <pre><code>  /**
     * Returns the intersection of the two given sets,
     * the set of all elements that are both in `s` or `t`.
     */
    def intersect(s: Set, t: Set): Set = (e: Int) =&gt; s(e) &amp;&amp; t(e)
  </code></pre>
  
  <p>The same question would be applicable for intersect function. <br>
  Please can anybody explain me the operation of the above two functions i.e these two statements</p>
  
  <p><code>(e: Int) =&gt; s(e) || t(e)</code> and <code>(e: Int) =&gt; s(e) &amp;&amp; t(e)</code></p>