summaryrefslogtreecommitdiffstats
path: root/stdlib/map.mli
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-05-30 13:33:57 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-05-30 13:33:57 +0000
commitb9a3348b4911c4b4910ea8ec2c12ad8eb1e42437 (patch)
tree468b21734cc920bcfd26b0a1f12402421c51e9d6 /stdlib/map.mli
parentec675d2f9a9b2ec4f1e92f491bde6679e368bc3f (diff)
Suppression de baltree, dont le code est maintenant integre
directement dans set. Creation de map. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@19 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/map.mli')
-rw-r--r--stdlib/map.mli20
1 files changed, 20 insertions, 0 deletions
diff --git a/stdlib/map.mli b/stdlib/map.mli
new file mode 100644
index 000000000..38e2e85e7
--- /dev/null
+++ b/stdlib/map.mli
@@ -0,0 +1,20 @@
+(* Maps over ordered types *)
+
+module type OrderedType =
+ sig
+ type t
+ val compare: t -> t -> int
+ end
+
+module type S =
+ sig
+ type key
+ type 'a t
+ val empty: 'a t
+ val add: key -> 'a -> 'a t -> 'a t
+ val find: key -> 'a t -> 'a
+ val iter: (key -> 'a -> 'b) -> 'a t -> unit
+ val fold: (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
+ end
+
+module Make(Ord: OrderedType): (S with key = Ord.t)