Applies an update function to a value to produce a new value to modify an object in-place.