am
02/18/2020, 7:18 AMdfriehs
02/18/2020, 1:36 PMmap
:
val newList = studentList.map {
if (it.id == student.id) it.copy(isFailed = false)
else it.copy()
}
Should the objects inside themselves be deep-copied, consider either implementing Cloneable
or in the case of data classes, call copy
.