How is the idiomatic way to modify the value of a list for the desired object? I mean instead of doing it manually like list[1].name = "name" is there any other idiomatic way to do so? I want to modify all of the values of a list with different "names".
n
natpryce
08/19/2020, 12:24 PM
If the elements are instances of a data class, you can use map and copy