summaryrefslogtreecommitdiff
path: root/stdlib/moreLabels.mli
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2010-05-25 13:29:43 +0000
committerAlain Frisch <alain@frisch.fr>2010-05-25 13:29:43 +0000
commit66092ce6ff6c788bf941cbd672fab8f89b5fed40 (patch)
tree04fff7a8275788f5f102adda99d9c5cf3781650d /stdlib/moreLabels.mli
parent734b8051613d689f7f45962c78f7681ada21d320 (diff)
downloadocaml-66092ce6ff6c788bf941cbd672fab8f89b5fed40.tar.gz
Extend Map with functions from Set.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10468 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/moreLabels.mli')
-rw-r--r--stdlib/moreLabels.mli24
1 files changed, 18 insertions, 6 deletions
diff --git a/stdlib/moreLabels.mli b/stdlib/moreLabels.mli
index fbf848cba8..55c773347f 100644
--- a/stdlib/moreLabels.mli
+++ b/stdlib/moreLabels.mli
@@ -73,18 +73,30 @@ module Map : sig
and (+'a) t
val empty : 'a t
val is_empty: 'a t -> bool
+ val mem : key -> 'a t -> bool
val add : key:key -> data:'a -> 'a t -> 'a t
- val find : key -> 'a t -> 'a
+ val singleton: key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
- val mem : key -> 'a t -> bool
+ val merge: f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
+ val compare: cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int
+ val equal: cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
- val map : f:('a -> 'b) -> 'a t -> 'b t
- val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t
val fold :
f:(key:key -> data:'a -> 'b -> 'b) ->
'a t -> init:'b -> 'b
- val compare: cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int
- val equal: cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool
+ val for_all: f:(key -> 'a -> bool) -> 'a t -> bool
+ val exists: f:(key -> 'a -> bool) -> 'a t -> bool
+ val filter: f:(key -> 'a -> bool) -> 'a t -> 'a t
+ val partition: f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t
+ val cardinal: 'a t -> int
+ val bindings: 'a t -> (key * 'a) list
+ val min_binding: 'a t -> (key * 'a)
+ val max_binding: 'a t -> (key * 'a)
+ val choose: 'a t -> (key * 'a)
+ val split: key -> 'a t -> 'a t * 'a option * 'a t
+ val find : key -> 'a t -> 'a
+ val map : f:('a -> 'b) -> 'a t -> 'b t
+ val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t
end
module Make : functor (Ord : OrderedType) -> S with type key = Ord.t
end