title: Pass function to array filter function error - Swift 4
body: <p>I'm trying to <strong>extend</strong> the <strong>array class</strong> writing a simple function that will receive a function as parameter and will use that to filter the current array.</p>
  
  <p>In this example "self" is actually an array.</p>
  
  <p>this is what I used so far:</p>
  
  <pre><code>    func applyFilter(filterFunction: (String) -&gt; Bool) {
      self.filter(filterFunction)
      }
  </code></pre>
  
  <p>But I'm receiving this error from xCode:</p>
  
  <p><a href="https://i.stack.imgur.com/W3DAs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W3DAs.png" alt="cannot convert value of type &#39;(String) -&gt; BOOL&#39; to expected argument type &#39;_ &#39; -&gt; Bool"></a></p>
  
  <p>Any ideas?</p>