I have a class where I want to be able to modify a list internally, but externally I want the list to be immutable; for example...
class Foo {
val items: List<String> get() = mutableItems
private val mutableItems: MutableList<String> = mutableListOf()
}
Is there a nicer way to express this?