title: Why kotlin map.indexed returns List<Any> insteand of List<MyObject>
body: <p>i'm playing a little bit with Kotlin and i don't understand this so, maybe someone can explain it to me.</p>
  
  <p>I have a data class which is:</p>
  
  <pre><code>data class Person (var name : String, var age : Int)
  </code></pre>
  
  <p>And i want to create a List which contains the Person with the multiplied age multiplied per 2, only on even items. So i created a new List and create a mutableList from it because i want to change their age. I did it in the following way: </p>
  
  <pre><code>    val personA = Person("john", 25)
      val personB = Person("Ane", 10)
      val personC = Person("will", 20)
      val personList = listOf(personA, personB, personC)
      var mutablePersons = mutableListOf&lt;Person&gt;()
      mutablePersons.addAll(personList)
  </code></pre>
  
  <p>And now i'm trying to create a new list with the items from <strong>mutablePersons</strong> modified. So i already did the following:</p>
  
  <pre><code>val mutablePersonsAgeChanged = mutablePersons.mapIndexed { index, person -&gt;
          if (index.rem(2) == 0) {
              person.age = person.age * 2
          }
      }
  </code></pre>
  
  <p>And.. there is something i'm not doing well, because <strong>mutablePersonAgeChanged</strong> is <code>List&lt;Any&gt;</code> and i want a <code>List&lt;Person&gt;</code>.</p>
  
  <p>So, my question is. What im doing wrong? How can make this mapIndexed Returns <code>List&lt;Person&gt;</code></p>