title: How to filter a list by using the ids of another list?
body: <p>I have a list of <code>ids</code>. I want to filter my list and only keep the values in that list that match the id.</p>
  <pre><code>fun filterHelper(ids: List&lt;Int&gt;, list: List&lt;People&gt;) {
       list.filter { ids.contains(it.id) }
  }
  </code></pre>
  <p>But this is very inefficient. It is essentially traversing the list O(n^2). Does Kotlin let me do better?</p>