W.Make
module E : OrderedType
module Set : SET with type elt = E.t
module Map : MAP with type key = E.t
val domain : 'a Map.t -> Set.t
domain m returns the domain of the map m, that is, the set of all keys for which there is a binding in the map m.
domain m
m
Time complexity: O(n), where n is the size of the map m.
O(n)
n
val lift : (Map.key -> 'a) -> Set.t -> 'a Map.t
lift f s returns a map whose domain is the set s and where every key x in the set s is mapped to the value f x.
lift f s
s
x
f x
Time complexity: O(n), where n is the size of the set s.