set

suspend fun set(key: K, block: suspend (V?) -> V?)

Set a value for the given key.

Parameters

block

A block that will be passed the current value for the key. The value that this block returns will be used as the new value for the key. Returning null indicates that the entry should be removed.