title: List clear and addAll in single statement Kotlin
body: <p>Is there any method in kotlin which replaces below two line into one. I know i can create a extension function but I'm eager to know if it already exist in kotlin. Something like <code>listOfChecklist.clearAndAddAll()</code>.</p>
  
  <pre><code>listOfChecklist.clear()
  listOfChecklist.addAll(newList)
  </code></pre>
  
  <p>This is what I'm doing now manually using an extension function. But I hope there is a better solution.</p>
  
  <pre><code>fun &lt;E&gt; MutableCollection&lt;E&gt;.clearAndAddAll(replace: MutableSet&lt;E&gt;) {
      clear()
      addAll(replace)
  }
  </code></pre>