effect-io-ai

Package: effect
Module: HashMap

HashMap.modifyHash

Alter the value of the specified key in the HashMap using the specified update function. The value of the specified key will be computed using the provided hash.

The update function will be invoked with the current value of the key if it exists, or None if no such value exists.

This function will always either update or insert a value into the HashMap.

Signature

declare const modifyHash: { <K, V>(key: K, hash: number, f: HashMap.UpdateFn<V>): (self: HashMap<K, V>) => HashMap<K, V>; <K, V>(self: HashMap<K, V>, key: K, hash: number, f: HashMap.UpdateFn<V>): HashMap<K, V>; }

Source

Since v2.0.0