When I have a MutableList, and I want to perform a...
# android
m
When I have a MutableList, and I want to perform an operation on it like filter, I do something like this:
filteredMembers = members.filter { memberIds.contains(it.id) }.toMutableList()
But I need to do toMutableList() at the end, which sort of seems wrong to me. Is it the right/only way to do?
m
You could also use
filterInto