A function that takes a previous value of type T and returns an updated value of the same type. Used for updating values in certain data structures or scenarios.
The type of the value being updated.
The previous value to be updated.
A function that takes a previous value of type T and returns an updated value of the same type. Used for updating values in certain data structures or scenarios.