aboutsummaryrefslogtreecommitdiffhomepage
path: root/clib/cMap.mli
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2018-05-23 13:36:39 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2018-05-23 18:50:10 +0200
commit153de30b639851d5ad285b765b2db7655b2cb635 (patch)
treea036a8a033e3ea573ea27a79d10b212e0fb444d4 /clib/cMap.mli
parentd8851bbd50df1f77af0aabfe98bebd44fcb4aa02 (diff)
Collecting Map.smart_* functions into a module Map.Smart.
Diffstat (limited to 'clib/cMap.mli')
-rw-r--r--clib/cMap.mli13
1 files changed, 11 insertions, 2 deletions
diff --git a/clib/cMap.mli b/clib/cMap.mli
index bb0019bb8..b45effb95 100644
--- a/clib/cMap.mli
+++ b/clib/cMap.mli
@@ -58,14 +58,23 @@ sig
(** Folding keys in decreasing order. *)
val smartmap : ('a -> 'a) -> 'a t -> 'a t
- (** As [map] but tries to preserve sharing. *)
+ (** [@@ocaml.deprecated "Same as [Smart.map]"] *)
val smartmapi : (key -> 'a -> 'a) -> 'a t -> 'a t
- (** As [mapi] but tries to preserve sharing. *)
+ (** [@@ocaml.deprecated "Same as [Smart.mapi]"] *)
val height : 'a t -> int
(** An indication of the logarithmic size of a map *)
+ module Smart :
+ sig
+ val map : ('a -> 'a) -> 'a t -> 'a t
+ (** As [map] but tries to preserve sharing. *)
+
+ val mapi : (key -> 'a -> 'a) -> 'a t -> 'a t
+ (** As [mapi] but tries to preserve sharing. *)
+ end
+
module Unsafe :
sig
val map : (key -> 'a -> key * 'b) -> 'a t -> 'b t