Module

JS.Map.Internal

Package
purescript-js-maps
Repository
gbagan/purescript-js-maps

#Map Source

newtype Map k v

Constructors

Instances

#fromFoldable Source

fromFoldable :: forall f k v. EncodeKey k => Functor f => Foldable f => f (Tuple k v) -> Map k v

#toArray Source

toArray :: forall k v. Map k v -> Array (Tuple k v)

#empty Source

empty :: forall k v. Map k v

#isEmpty Source

isEmpty :: forall k v. Map k v -> Boolean

#size Source

size :: forall k v. Map k v -> Int

#singleton Source

singleton :: forall k v. EncodeKey k => k -> v -> Map k v

#member Source

member :: forall k v. EncodeKey k => k -> Map k v -> Boolean

#insert Source

insert :: forall k v. EncodeKey k => k -> v -> Map k v -> Map k v

#delete Source

delete :: forall k v. EncodeKey k => k -> Map k v -> Map k v

#lookup Source

lookup :: forall k v. EncodeKey k => k -> Map k v -> Maybe v

#alter Source

alter :: forall k v. EncodeKey k => (Maybe v -> Maybe v) -> k -> Map k v -> Map k v

Insert, remove or update a value for a key in a map

#update Source

update :: forall k v. EncodeKey k => (v -> Maybe v) -> k -> Map k v -> Map k v

Remove or update a value for a key in a map