Erl.Data.Map
- Package
- erl-maps
- Repository
- purerl/purescript-erl-maps
#filterKeys Source
filterKeys :: forall k. (k -> Boolean) -> (Map k) ~> (Map k)
Filter out those key/value pairs of a map for which a predicate on the key fails to hold.
#fromFoldable Source
fromFoldable :: forall v k f. Foldable f => f (Tuple k v) -> Map k v
Convert any foldable collection of key/value pairs to a map. On key collision, later values take precedence over earlier ones.
#fromFoldableWith Source
fromFoldableWith :: forall v k f. Foldable f => (v -> v -> v) -> f (Tuple k v) -> Map k v
Convert any foldable collection of key/value pairs to a map. On key collision, the values are configurably combined.
#fromFoldableWithIndex Source
fromFoldableWithIndex :: forall v k f. FoldableWithIndex k f => f v -> Map k v
Convert any indexed foldable collection into a map.
#insertWith Source
insertWith :: forall v k. (v -> v -> v) -> k -> v -> Map k v -> Map k v
Inserts or updates a value with the given function.
The combining function is called with the existing value as the first argument and the new value as the second argument.
#mapWithKey Source
mapWithKey :: forall b a k. (k -> a -> b) -> Map k a -> Map k b
#mapMaybeWithKey Source
mapMaybeWithKey :: forall b a k. (k -> a -> Maybe b) -> Map k a -> Map k b
Applies a function to each key/value pair in a map, discarding entries where the function returns Nothing.
#toUnfoldable Source
toUnfoldable :: forall v k f. Unfoldable f => Map k v -> f (Tuple k v)
Convert a map to an unfoldable structure of key/value pairs where the keys are in ascending order
#toUnfoldableUnordered Source
toUnfoldableUnordered :: forall v k f. Unfoldable f => Map k v -> f (Tuple k v)
Convert a map to an unfoldable structure of key/value pairs
- Modules
- Erl.
Data. Map