title: How to convert vararg to list?
body: <p>I have a function with a vararg parameter. This vararg parameter needs to be passed to another function as a list.</p>
  
  <p>How do I convert the vararg param into a list? <code>listOf()</code> gave me an error.</p>
  
  <pre><code>fun insertMissingEntities(vararg entities: Entity) {
    val list = listOf(entities)
    passMissingEntities(list) // Type mismatch. 
                              // Required: List&lt;Entity&gt;
                              // Found: List&lt;Array&lt;out Entity&gt;&gt;
  }
  </code></pre>