title: Why is `foo in list` returning false even though the arrayListOf contains it?
body: <p>I was trying out this piece of code in Kotlin which I wrote out(I am a beginner in Kotlin). I expected to receive &quot;True&quot; however I received &quot;False&quot; even though <code>listo</code> contains it. This is my code:</p>
  <pre><code>fun main(args: Array&lt;String&gt;) {
      class product(var product: String, var productName: String)
      val listo = arrayListOf(
              product(&quot;shirt&quot;, &quot;yoyo&quot;)
      )
      val testing = product(&quot;shirt&quot;, &quot;yoyo&quot;)
      if (testing in listo) {
          println(&quot;True&quot;)
      } else {
          println(&quot;False&quot;)
      }
  }
  </code></pre>
  <p>How can I solve this problem? Any help is really appreciated</p>