Module type HistoryMap.S


module type S = sig .. end
The signature is an extension of the signature found in OwnMap. That's the case because you can now appy the two functors HistoryMap.AddS and HistoryMap.AddString to the result of the HistoryMap.Make functor, too. Please notice that fold, map, mapi, iter, to_list and all functions that deals only with the newest binding. All hidden bindings are ignored. Use the functions with the prefix _all to deal with all bindings.

include OwnMap.S
val iter_all : ?rev:bool -> (key -> img -> unit) -> t -> unit
iter_all f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys. All bindings are presented to f, also bindings hidden by more recent bindings.

The hidden bindings follows the binding that hide the bindings process. So if we add "x" with image "xi1", then later adds "x" with image "xi2" that hides the first binding, the tuple ("x","xi2") will passed to the function before ("x","xi1"). You can change this behavior with the optional parameter rev. Pass false here to process the hidden bindings first.

val map_all : ?rev:bool -> (img -> img) -> t -> t
map_all f m behaves like map f m, except that also the hidden bindings are passed to f.

The hidden bindings follows the binding that hide the bindings process. So if we add "x" with image "xi1", then later adds "x" with image "xi2" that hides the first binding, the tuple ("x","xi2") will passed to the function before ("x","xi1"). You can change this behavior with the optional parameter rev. Pass false here to process the hidden bindings first.

val mapi_all : ?rev:bool -> (key -> img -> img) -> t -> t
mapi_all f m behaves like mapi f m, except that also the hidden bindings are passed to f.

The hidden bindings follows the binding that hide the bindings process. So if we add "x" with image "xi1", then later adds "x" with image "xi2" that hides the first binding, the tuple ("x","xi2") will passed to the function before ("x","xi1"). You can change this behavior with the optional parameter rev. Pass false here to process the hidden bindings first.

val fold_all : ?rev:bool -> (key -> img -> 'a -> 'a) -> t -> 'a -> 'a
fold_all f m behaves like fold f m, except that also the hidden bindings are passed to f.

The hidden bindings follows the binding that hide the bindings process. So if we add "x" with image "xi1", then later adds "x" with image "xi2" that hides the first binding, the tuple ("x","xi2") will passed to the function before ("x","xi1"). You can change this behavior with the optional parameter rev. Pass false here to process the hidden bindings first.

val to_list_all : ?rev:bool -> t -> (key * img) list
to_list_all m behaves like to_list m, except that also the hidden bindings are part of the result list.

The hidden bindings follows the binding that hide the bindings in the list. So if we add "x" with image "xi1", then later adds "x" with image "xi2" that hides the first binding, the tuple ("x","xi2") appears in front of ("x","xi1") in the list. You can change this behavior with the optional parameter rev. Pass false here to get the hidden bindings first.

val compare_all : t -> t -> int
compare_all m1 m2 compares two maps and respects the full history of the two maps. This function is a total ordering over maps with histories.
val equal_all : t -> t -> bool
equal m1 m2 tests whether the maps m1 and m2 are equal. Here it resprects the full history of the two maps. So the hidden bindings of the maps are importend for the result.