I am trying to edit the elements located within a MutableList but they seem to be val types. Here is what I have tried:
for(note in item.notes.toMutableSet()) {
note = note.trim()
}
I keep getting an error like: val cannot be reassigned. Any suggestions on how to edit the element directly from the list and having this change reflected in the list as well.