Returns a copy of the collection with the value at key set to the result of providing the existing value to the updating function.
A functional alternative to collection.update(key, fn)
which will also work with plain Objects and Arrays as an alternative for collectionCopy[key] = fn(collection[key])
.
update(collection: C, key, updater): C;