diff options
| author | Pierre-Marie Pédrot | 2013-11-24 19:44:10 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2013-11-24 19:44:10 +0100 |
| commit | e9cd8eef6fd29e03b809926e35aae57df53aa8d7 (patch) | |
| tree | 761ffa139061470f65c7c74c6b5aa988c138c9a9 /lib/cMap.mli | |
| parent | 06303bbeac031ac0382eb427724fc3911fa4b696 (diff) | |
Adding fold_left / fold_right function to maps.
Diffstat (limited to 'lib/cMap.mli')
| -rw-r--r-- | lib/cMap.mli | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/cMap.mli b/lib/cMap.mli index 6b61782b05..7091e844e3 100644 --- a/lib/cMap.mli +++ b/lib/cMap.mli @@ -39,6 +39,12 @@ sig (** [bind f s] transform the set [x1; ...; xn] into [x1 := f x1; ...; xn := f xn]. *) + val fold_left : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + (** Alias for {!fold}, to easily track where we depend on fold order. *) + + val fold_right : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + (** Folding keys in decreasing order. *) + module Unsafe : sig val map : (key -> 'a -> key * 'b) -> 'a t -> 'b t |
