title: Kotlin: An elegant way to check if a List contains a value of another Collection / List?
body: <p>Is there an elegant / idiomatic way to check in Kotlin whether an element of one list is contained in another list? </p>
  
  <p>Given:</p>
  
  <pre><code>val listA = listOf("A", "B", "C")
  </code></pre>
  
  <p>I can write expressions such as:</p>
  
  <pre><code>listA.intersect(setOf("E", "C")).isNotEmpty()
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>listA.any { it in listOf("E","C") }
  </code></pre>
  
  <p>That's OK, but I wonder if there is even a more fluent way to express that (as this code is simplified, the real code is more complex).</p>
  
  <p>My fallback is to use a custom extension function, e.g.:</p>
  
  <pre><code>fun &lt;T&gt; List&lt;T&gt;.containsAny(vararg other : T) =
        this.intersect(other.toSet()).isNotEmpty()
  </code></pre>
  
  <p>I just wonder if there is a better way.</p>