package coq-core
Install
Dune Dependency
Authors
Maintainers
Sources
md5=66e57ea55275903bef74d5bf36fbe0f1
sha512=1a7eac6e2f58724a3f9d68bbb321e4cfe963ba1a5551b9b011db4b3f559c79be433d810ff262593d753770ee41ea68fbd6a60daa1e2319ea00dff64c8851d70b
doc/coq-core.clib/HMap/Make/index.html
Module HMap.Make
Source
Hash maps are maps that take advantage of having a hash on keys. This is essentially a hash table, except that it uses purely functional maps instead of arrays.
CAVEAT: order-related functions like fold
or iter
do not respect the provided order anymore! It's your duty to do something sensible to prevent this if you need it.
Parameters
module M : HashedType
Signature
The underlying Map library
include CSig.UMapS with type key = M.t
Sets used by the domain function
Same as add
, but expects the key to be present, and thus faster.
Apply the given function to the binding of the given key.
bind f s
transform the set x1; ...; xn
into x1 := f x1; ...; xn := f xn
.
find_range in_range m
Given a comparison function in_range x
, that tests if x
is below, above, or inside a given range filter_range
returns the submap of m
whose keys are in range. Note that in_range
has to define a continouous range.
Like map
but keeping only bindings mapped to Some
val symmetric_diff_fold :
(key -> 'a option -> 'a option -> 'b -> 'b) ->
'a t ->
'a t ->
'b ->
'b
symmetric_diff f ml mr acc
will efficiently fold over the difference between ml
and mr
, assumed that they share most of their internal structure. A call to f k vl vr
means that if vl
is Some
, then k
exists in ml
. Similarly, if vr
is Some
, then k
exists in mr
. If both vl
and vr
are Some
, then vl != vr
.
Fold operators parameterized by any monad.