JS.Map.Primitive.Internal
- Package
- purescript-js-maps
- Repository
- gbagan/purescript-js-maps
#Map Source
data Map t0 t1
Instances
(Key k) => Functor (Map k)
(Key k) => FunctorWithIndex k (Map k)
(Key k) => Foldable (Map k)
(Key k) => FoldableWithIndex k (Map k)
(Key k) => Traversable (Map k)
(Key k) => TraversableWithIndex k (Map k)
(Key k, Eq v) => Eq (Map k v)
(Key k) => Eq1 (Map k)
(Key k, Ord v) => Ord (Map k v)
(Key k, Show v) => Show (Map k v)
(Key k, Semigroup v) => Semigroup (Map k v)
(Key k, Semigroup v) => Monoid (Map k v)
#STMap Source
data STMap :: Region -> Type -> Type -> Type
data STMap t0 t1 t2
A reference to a mutable Map
The first type parameter represents the memory region which the map belongs to. The second type parameter defines the type of elements of the mutable map.
The runtime representation of a value of type STMap r k v
is the same as
that of Map k v
, except that mutation is allowed.
#_foldSCMap Source
_foldSCMap :: forall k v z. Fn4 (Map k v) z (z -> k -> v -> Maybe z) (forall b. b -> Maybe b -> b) z
#fromFoldable Source
fromFoldable :: forall f k v. Key k => Foldable f => f (Tuple k v) -> Map k v
Create an Map k v
from a foldable collection of key/value pairs
#fromFoldableWithIndex Source
fromFoldableWithIndex :: forall f k v. Key k => FoldableWithIndex k (f k) => f k v -> Map k v
Create an Map k v
from a k-indexed foldable collection
#fromFoldableWith Source
fromFoldableWith :: forall f k v. Key k => Foldable f => (v -> v -> v) -> f (Tuple k v) -> Map k v
Create an Map k v
from a foldable collection of key/value pairs, using the
specified function to combine values for duplicate keys.
#toArrayWithKey Source
toArrayWithKey :: forall k v a. (k -> v -> a) -> Map k v -> Array a
#toUnfoldable Source
toUnfoldable :: forall f k v. Key k => Unfoldable f => Map k v -> f (Tuple k v)
Unfolds a map into a list of key/value pairs
#toAscUnfoldable Source
toAscUnfoldable :: forall f k v. Key k => Unfoldable f => Map k v -> f (Tuple k v)
Unfolds a map into a list of key/value pairs which is guaranteed to be sorted by key
#mapWithKey Source
mapWithKey :: forall k v v'. Key k => (k -> v -> v') -> Map k v -> Map k v'
Apply a function of two arguments to each key/value pair, producing a new map
#filterWithKey Source
filterWithKey :: forall k v. Key k => (k -> v -> Boolean) -> Map k v -> Map k v
Filter out those key/value pairs of a map for which a predicate fails to hold.
#deleteImpl Source
deleteImpl :: forall r k m. STFn2 m k r Unit