Module

Specular.Internal.UniqueMap.Mutable

Package
purescript-specular
Repository
restaumatic/purescript-specular

#Unique Source

data Unique :: Type

Keys used to index UniqueMap.

#UniqueMap Source

data UniqueMap :: Type -> Type

A mutable associative container that generates a key on each insert.

#new Source

new :: forall a. Effect (UniqueMap a)

Constructs an empty UniqueMap.

#insert Source

insert :: forall a. a -> UniqueMap a -> Effect Unique

Inserts the given value into the map under a new unique key.

#lookup Source

lookup :: forall a. Unique -> UniqueMap a -> Effect (Maybe a)

Returns the value associated with a particular key, or Nothing if it's not there.

#delete Source

delete :: forall a. Unique -> UniqueMap a -> Effect Unit

Removes the value associated with the given key from the map.

#values Source

values :: forall a. UniqueMap a -> Effect (Array a)

Returns all values inserted into the map so far.