Skip to content

Commit

Permalink
revert change to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Feb 16, 2019
1 parent 5b08cdf commit 39105fd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions gmap.mli
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module type S = sig
type t
(** The type of maps from type ['a key] to ['a]. *)

(** {3 Constructors} *)
(** {2 Constructors} *)

val empty : t
(** [empty] is the empty map. *)
Expand All @@ -101,15 +101,15 @@ module type S = sig
(** [singleton key value] creates a one-element map that contains a binding
[value] for [key]. *)

(** {3 Basic operations} *)
(** {2 Basic operations} *)

val is_empty : t -> bool
(** [is_empty m] returns [true] if the map [m] is empty, [false] otherwise. *)

val cardinal : t -> int
(** [cardinal m] returns the number of bindings of the map [m]. *)

(** {3 Lookup operations} *)
(** {2 Lookup operations} *)

val mem : 'a key -> t -> bool
(** [mem key m] returns [true] if the map [m] contains a binding for [key]. *)
Expand All @@ -123,7 +123,7 @@ module type S = sig
@raise Not_found if [m] does not contain a binding for [key]. *)

(** {3 Insertion and removal operations} *)
(** {2 Insertion and removal operations} *)

val add_unless_bound : 'a key -> 'a -> t -> t option
(** [add_unless_bound key value m] returns [Some m'], a map containing the
Expand All @@ -150,7 +150,7 @@ module type S = sig
type b = B : 'a key * 'a -> b
(** The type for a binding: a pair containing a key and its value. *)

(** {3 Selection} *)
(** {2 Selection} *)

val min_binding : t -> b option
(** [min_binding m] is the minimal binding in [m], [None] if [m] is empty. *)
Expand All @@ -165,7 +165,7 @@ module type S = sig
(** [bindings m] returns the list of all bindings in the given map [m]. The
list is sorted with respect to the ordering over the type of the keys. *)

(** {3 Lookup} *)
(** {2 Lookup} *)

val findb : 'a key -> t -> b option
(** [findb key m] returns [Some b] if the binding of [key] in [m] is [b], or
Expand All @@ -177,7 +177,7 @@ module type S = sig
@raise Not_found if [m] does not contain a binding for [key]. *)


(** {3 Insertion} *)
(** {2 Insertion} *)

val addb_unless_bound : b -> t -> t option
(** [addb_unless_bound b m] returns [Some m'], a map containing the
Expand All @@ -189,14 +189,14 @@ module type S = sig
binding [b]. If [key], the first part of [b] was already bound in [m],
the previous binding disappears. *)

(** {3 Equality} *)
(** {2 Equality} *)

val equal : (b -> b -> bool) -> t -> t -> bool
(** [equal p m m'] tests whether the maps [m] and [m'] are equal, that is
contain equal keys and associate them with equal data. [p] is the
equality predicate used to compare the data associated with the keys. *)

(** {3 Higher-order functions} *)
(** {2 Higher-order functions} *)

val iter : (b -> unit) -> t -> unit
(** [iter f m] applies [f] to all bindings in [m]. The bindings are passed in
Expand Down Expand Up @@ -228,7 +228,7 @@ module type S = sig
and [m']. When the same binding is defined in both maps, the function [f]
is used to combine them. *)

(** {3 Pretty printer} *)
(** {2 Pretty printer} *)

val pp : Format.formatter -> t -> unit
(** [pp fmt m] is a pretty printer of the map [m]. *)
Expand Down

0 comments on commit 39105fd

Please sign in to comment.