kotlinx.collections.immutable icon indicating copy to clipboard operation
kotlinx.collections.immutable copied to clipboard

Consider a different name for `mutate`

Open yogurtearl opened this issue 5 years ago • 2 comments

the name of the mutate extension could be a bit misleading, since it is returning a new collection with the given modification and not "mutate"ing the existing collection.

In this way, it is similar to the copy method on data classes, so maybe we could change mutate to be copy ?

or some other name that indicates that a new collection is being returned and the existing collection is unmodified.

yogurtearl avatar Dec 12 '19 21:12 yogurtearl

transform may be

i-void avatar Apr 04 '20 12:04 i-void

produce(). The Immer library for javascript uses it

johannesschaffer avatar Feb 14 '22 01:02 johannesschaffer