title: How to check if a list of custom types, contains a subset of values of that type in Kotlin?
body: <p>I have a list of a custom date type:</p>
  <pre><code>val dates = mutableListOf(
      Date(year = 2020, month = 4, day = 3),
      Date(year = 2021, month = 5, day = 16),
      Date(year = 2020, month = 1, day = 29)
  )
  </code></pre>
  <p>And a set of &quot;months&quot; I need to ensure are in the list:</p>
  <pre><code>val months = listOf(1, 4)
  </code></pre>
  <p>Is there a way to check if <code>dates</code> contains all of the <code>months</code> from the list? I feel like there could be a way to do this using the <code>.containsAll()</code> function on the initial list, but I am not sure.</p>