- record SortedMap : Type -> Type -> Type
- Totality: total
Constructor: - M : SortedDMap k (const v) -> SortedMap k v
Projection: - .unM : SortedMap k v -> SortedDMap k (const v)
- delete : k -> SortedMap k v -> SortedMap k v
-
- empty : Ord k => SortedMap k v
-
- fromList : Ord k => List (k, v) -> SortedMap k v
-
- insert : k -> v -> SortedMap k v -> SortedMap k v
-
- insertFrom : Foldable f => f (k, v) -> SortedMap k v -> SortedMap k v
-
- keys : SortedMap k v -> List k
Gets the keys of the map.
- leftMost : SortedMap key val -> Maybe (key, val)
Returns the leftmost (least) key and value
- lookup : k -> SortedMap k v -> Maybe v
-
- lookupBetween : key -> SortedMap key val -> (Maybe (key, val), Maybe (key, val))
looks up a key in map, returning the left and right closest values, so that
k1 <= k < k2. If at the end of the beginning and/or end of the sorted map, returns
nothing appropriately
- merge : Semigroup v => SortedMap k v -> SortedMap k v -> SortedMap k v
Merge two maps using the Semigroup (and by extension, Monoid) operation.
Uses mergeWith internally, so the ordering of the left map is kept.
- mergeLeft : SortedMap k v -> SortedMap k v -> SortedMap k v
Left-biased merge, also keeps the ordering specified by the left map.
- mergeWith : (v -> v -> v) -> SortedMap k v -> SortedMap k v -> SortedMap k v
Merge two maps. When encountering duplicate keys, using a function to combine the values.
Uses the ordering of the first map given.
- rightMost : SortedMap key val -> Maybe (key, val)
Returns the rightmost (greatest) key and value
- singleton : Ord k => k -> v -> SortedMap k v
-
- toList : SortedMap k v -> List (k, v)
-
- values : SortedMap k v -> List v
Gets the values of the map. Could contain duplicates.