title: Scala: Not a legal formal parameter when trying to call a function who has a predicate as one of its argument
body: <p>Here is the code that I'm trying to execute,</p>
  
  <p><code>type Set = scala.collection.immutable.Set[Int]</code></p>
  
  <p>defined type alias Set</p>
  
  <p><code>def filter(s: Set, p: Int =&gt; Boolean): Set = Set(1,2,3)</code></p>
  
  <p>filter: (s: Set, p: Int => Boolean)Set</p>
  
  <p><code>filter(Set(1,2,3), (4 =&gt; 2 &lt; 3))</code></p>
  
  <p><strong>error:</strong> not a legal formal parameter
         filter(Set(3,4), (4 => 2&lt;3))</p>
  
  <p>What am I doing wrong? Please help.</p>