effect-io-ai

Package: effect
Module: TMap

TMap.setIfAbsent

Stores new binding in the map if it does not already exist.

Signature

declare const setIfAbsent: { <K, V>(key: K, value: V): (self: TMap<K, V>) => STM.STM<void>; <K, V>(self: TMap<K, V>, key: K, value: V): STM.STM<void>; }

Source

Since v2.0.0