title: Array.contains returns false
body: <p>I have an array of users <code>[User]</code> called conversationUsers</p>
  
  <p>User is defined as</p>
  
  <pre><code>public class User: NSManagedObject { ... }
  </code></pre>
  
  <p>and <code>currUser</code> is an User object</p>
  
  <p>if I try</p>
  
  <pre><code>currUser == conversationUsers[0]
  </code></pre>
  
  <p>it results <strong>true</strong></p>
  
  <p>but </p>
  
  <pre><code>conversationUsers.contains(currUser)
  </code></pre>
  
  <p>results <strong>false</strong></p>
  
  <p>If instead I use</p>
  
  <pre><code>conversationUsers.contains({$0 == currUser})
  </code></pre>
  
  <p>it returns <strong>true</strong></p>
  
  <p>FYI I have also defined this:</p>
  
  <pre><code>public func ==(lhs: User, rhs: User) -&gt; Bool {
  
      let logicalExpression = lhs.email.lowercaseString == rhs.email.lowercaseString
  
      return logicalExpression
  
  }
  </code></pre>
  
  <hr>
  
  <p>Why contains returns false? Which is his default predicate?</p>
  
  <p>Thank you for your help</p>