aboutsummaryrefslogtreecommitdiff
path: root/lib/cMap.mli
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2014-01-29 20:29:35 +0100
committerPierre-Marie Pédrot2014-01-29 20:29:35 +0100
commit5a430f21ecbba4cce096efac44a69589d1d7382b (patch)
tree3668309c21bdbcfc98e1f5ac09ae4833d8b87162 /lib/cMap.mli
parenta438546db97261451882286f82114191247ad275 (diff)
Adding a smartmap[i] operator to maps.
Diffstat (limited to 'lib/cMap.mli')
-rw-r--r--lib/cMap.mli6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/cMap.mli b/lib/cMap.mli
index 7091e844e3..9fe3355515 100644
--- a/lib/cMap.mli
+++ b/lib/cMap.mli
@@ -45,6 +45,12 @@ sig
val fold_right : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
(** Folding keys in decreasing order. *)
+ val smartmap : ('a -> 'a) -> 'a t -> 'a t
+ (** As [map] but tries to preserve sharing. *)
+
+ val smartmapi : (key -> 'a -> 'a) -> 'a t -> 'a t
+ (** As [mapi] but tries to preserve sharing. *)
+
module Unsafe :
sig
val map : (key -> 'a -> key * 'b) -> 'a t -> 'b t