title: How do we remove elements from a MutableList in Kotlin
body: <p>I have the following code where I need to display the elements of a list in view and then remove those items from the list. I have been looking into filter vs map in kotlin but no luck finding a solution.</p>
  
  <pre><code>var mutableList: MutableList&lt;Object&gt; = myImmutableList.toMutableList()
  for (x in mutableList.indices)
  {
      val tile = row!!.getChildAt(x % 4)
      val label = tile.findViewById(android.R.id.text1) as TextView
      label.text = mutableList[x].name
      val icon = tile.findViewById(android.R.id.icon) as ImageView
      picasso.load(mutableList[x].icon).into(icon)
  }
  </code></pre>