(** Purely functional map, parameterised by the values stored in the map (not the keys). *)
type'vmap
(** The empty map. *)
valempty:'vmap
(** Inserts the key-value pair into the map. If the key already exists, it is overwritten. Runs in O(log(n)). *)
valinsert:key*'v->'vmap->'vmap
(** Fetches a value from the map based on the key. Returns an option to handle cases where the key is not present. Runs in O(log(n)). *)
valfetch:key->'vmap->'voption
end
moduletypeMapSpecification=sig
(** The type of keys in the map. *)
typekey
(** Comparison should return a value less than 0 for when the first value is smaller, greater than 0 for when the second is smaller, and 0 when they are equivalent. *)