title: Check if array contains element in Swift 4
body: <p>I am trying to check if array <code>categories</code> contain number 1 as <code>Int</code> since <code>categories = [Int]()</code> for example <code>categories = {1, 2, 3, 4, 5}</code></p>
  
  <p>I have tried  the below code which gives me error <code>Binary operator '==' cannot be applied to operands of type 'Any' and 'Int'</code></p>
  
  <pre><code>if categories.contains (where: {$0 == 1}) {
      // 1 is found
  }
  </code></pre>
  
  <p>also tried it without the where and brackets as below which gives me the same error</p>
  
  <pre><code>if categories.contains { $0 == 1 } {
      // 1 is found
  }
  </code></pre>
  
  <p>I tried using just the element as below which gives me error <code>Missing argument label 'where:' in call</code></p>
  
  <pre><code>if categories.contains(1) {
      // 1 is found
  }
  </code></pre>
  
  <p>How can I do that?</p>