Up

module Heap

: sig
#
module type Ordered = sig
#
type t
#
val compare : t -> t -> int
end
#
exception EmptyHeap
#
module Imperative : functor (X : Ordered) -> sig
#
type t
#
val create : int -> t
#
val is_empty : t -> bool
#
val add : t -> X.t -> unit
#
val maximum : t -> X.t
#
val remove : t -> unit
#
val pop_maximum : t -> X.t
#
val iter : (X.t -> unit) -> t -> unit
#
val fold : (X.t -> 'a -> 'a) -> t -> 'a -> 'a
end
#
module type FunctionalSig = sig
#
type elt
#
type t
#
val empty : t
#
val add : elt -> t -> t
#
val maximum : t -> elt
#
val remove : t -> t
#
val iter : (elt -> unit) -> t -> unit
#
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
end
#
module Functional : functor (X : Ordered) -> FunctionalSig with type elt = X.t
end