Module Prelude.Leftist

A leftist heap; can be a min-heap or a max-heap.

module type S = sig ... end

The type of leftist heaps.

type m =
  1. | Min
  2. | Max

The type of heaps.

module Min : sig ... end

Min is module that constructs a min-heap.

module Max : sig ... end

Max is module that constructs a max-heap.

module type MinMax = sig ... end
module Make (M : MinMax) (Ord : OrderedType) : S with type elt = Ord.t

(Make (M) (OT)) is a leftist min- or max-heap on the ordered type OT; see S; (Make (Min) (OT)) is a min-heap on OT, while (Make (Max) (OT)) is a max-heap on OT.