Std.Map
47 public declarations
- adjust
&Map[K, V] -> K -> fn(V) -> V -> Map[K, V]An entry's value transformed, or the map unchanged when the key has none.
- all
&Map[K, V] -> fn(K, V) -> Bool -> BoolWhether every entry satisfies the predicate. True for an empty map.
- alter
&Map[K, V] -> K -> fn(Option[V]) -> Option[V] -> Map[K, V]An entry inserted, replaced, or removed by one transformation.
- any
&Map[K, V] -> fn(K, V) -> Bool -> BoolWhether any entry satisfies the predicate. False for an empty map.
- containsKey
&Map[K, V] -> K -> BoolWhether a key has an entry.
- countValues
&Map[K, V] -> fn(V) -> Bool -> IntHow many values the predicate accepts.
- empty
Map[K, V]A map with no entries.
- filterKeys
&Map[K, V] -> fn(K) -> Bool -> Map[K, V]Only the entries whose key the predicate accepts.
- filterValues
&Map[K, V] -> fn(V) -> Bool -> Map[K, V]Only the entries whose value the predicate accepts.
- findKey
&Map[K, V] -> fn(V) -> Bool -> Option[K]The first key whose value the predicate accepts, or `None`.
- fold
&Map[K, V] -> fn(A, K, V) -> A -> A -> AEvery entry combined into one value, in key order.
- fromPairs
&Array[(K, V)] -> Map[K, V]A map built from key and value pairs.
- fromPairsWith
&Array[(K, V)] -> fn(V, V) -> V -> Map[K, V]A map built from pairs, with a rule for keys that appear more than once.
- get
&Map[K, V] -> K -> Option[V]The value stored under a key, or `None`.
- getOr
&Map[K, V] -> K -> V -> VThe value stored under a key, or a fallback.
- greatest
&Map[K, V] -> Option[(K, V)]The largest key and its value, or `None` for an empty map.
- groupBy
&Array[T] -> fn(T) -> K -> Map[K, Array[T]]Items collected under the key each one produces.
- insert
&Map[K, V] -> K -> V -> Map[K, V]The map with an entry added or replaced.
- insertIfAbsent
&Map[K, V] -> K -> V -> Map[K, V]An entry added only when its key has none.
- intersectWith
&Map[K, V] -> &Map[K, V] -> fn(V, V) -> V -> Map[K, V]Only the keys both maps have, with their values combined.
- invert
&Map[K, V] -> Map[V, K]The map with its keys and values exchanged.
- isEmpty
&Map[K, V] -> BoolWhether the map has no entries.
- keys
&Map[K, V] -> Array[K]Every key, in order.
- keySet
&Map[K, V] -> Set[K]The keys as a set.
- keysNotIn
&Map[K, V] -> &Map[K, V] -> Array[K]The keys of one map that the other does not have.
- least
&Map[K, V] -> Option[(K, V)]The smallest key and its value, or `None` for an empty map.
- mapKeys
&Map[K, V] -> fn(K) -> L -> Map[L, V]Every key transformed. A transformation that sends two keys to one keeps the
- mapValues
&Map[K, A] -> fn(A) -> B -> Map[K, B]Every value transformed.
- merge
&Map[K, V] -> &Map[K, V] -> Map[K, V]Two maps combined, with the second map's entries winning.
- mergeAll
&Array[Map[K, V]] -> Map[K, V]Every map combined in order, with later maps' entries winning.
- mergeWith
&Map[K, V] -> &Map[K, V] -> fn(V, V) -> V -> Map[K, V]Two maps combined, with a caller-supplied rule for keys in both.
- notContainsKey
&Map[K, V] -> K -> BoolWhether a key has no entry.
- pairs
&Map[K, V] -> Array[(K, V)]Every entry as a pair, in key order.
- partition
&Map[K, V] -> fn(K, V) -> Bool -> (Map[K, V], Map[K, V])The entries the predicate accepts, and the entries it rejects.
- remove
&Map[K, V] -> K -> Map[K, V]The map with a key's entry removed, or unchanged when there is none.
- removeGreatest
&Map[K, V] -> Map[K, V]The map without its largest key.
- removeLeast
&Map[K, V] -> Map[K, V]The map without its smallest key.
- restrictTo
&Map[K, V] -> &Array[K] -> Map[K, V]Only the keys the given array names.
- singleton
K -> V -> Map[K, V]A map with one entry.
- size
&Map[K, V] -> IntThe number of entries.
- tally
&Array[T] -> Map[T, Int]How many times each value appears in an array.
- toArray
&Map[K, V] -> Array[(K, V)]The entries as an array, in key order.
- update
&Map[K, V] -> K -> fn(V) -> Option[V] -> Map[K, V]An entry's value transformed, removing the entry when the result is absent.
- upsert
&Map[K, V] -> K -> V -> fn(V) -> V -> Map[K, V]An entry's value transformed, inserting a starting value when it is absent.
- values
&Map[K, V] -> Array[V]Every value, in the order of its key.
- without
&Map[K, V] -> &Map[K, V] -> Map[K, V]Only the keys the first map has and the second does not.
- withoutKeys
&Map[K, V] -> &Array[K] -> Map[K, V]Every key the given array does not name.
