IdrisDoc: Data.SortedMap

Data.SortedMap

data SortedMap : Type -> Type -> Type
Empty : Ord k => SortedMap k v
M : Ord k => (n : Nat) -> Tree n k v o -> SortedMap k 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.

lookup : k -> SortedMap k v -> Maybe v
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.

null : SortedMap k v -> Bool
toList : SortedMap k v -> List (k, v)
values : SortedMap k v -> List v

Gets the values of the map. Could contain duplicates.