Module type Prime_accretion_map.S1
Signature for an accretion map with polymorphic elements.
val empty : 'a tThe empty map.
val is_empty : 'a t -> boolis_empty mis true iffmis the empty map.
val cardinal : 'a t -> intcardinal mis the number of bindings inm.
val result : 'a t -> 'a resultresult mis the nested application of the monoid operator over elements of the map in key-order but arbitrary associative combination.
val app : 'a t -> key -> 'a elt optionapp mis the partial function corresponding to the bindings ofm.
val find : key -> 'a t -> 'a eltfind k mis the element mapped tok.- raises Not_found
if
khas no binding inm
val add : key -> 'a elt -> 'a t -> 'a tadd k e mis the least map bindingktoeand anyk' ≠ ktofind k' m.
val bindings : 'a t -> (key * 'a elt) listbindings mis the list containing(k, e)iffkis bound toeinm.
val fold : (key -> 'a elt -> 'b -> 'b) -> 'a t -> 'b -> 'bfold f misf kₙ eₙ ∘ ... ∘ f k₁ e₁where(kᵢ, eᵢ)are the bindings ofmin key order.
val iter : (key -> 'a elt -> unit) -> 'a t -> unititer f mcallsf k efor each binding(k, e)ofmin key order.
val search : (key -> 'a elt -> 'b option) -> 'a t -> 'b optionsearch f misf k ewhere(k, e)is the binding with smallestkfor whichf k e ≠ None, orNoneifmhas no such binding.