package oc45

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t

The type of the elements

val compare : t -> t -> int

The type of the elements

A function such that compare a b is zero if a equals b and is strictly negative (resp. positive) if a is smaller (resp. greater) than b. In most cases, Pervasives.compare will do.

val avg : t -> t -> t

A function such that compare a b is zero if a equals b and is strictly negative (resp. positive) if a is smaller (resp. greater) than b. In most cases, Pervasives.compare will do.

A function that returns "the average" of its two arguments, or the closest thing to it.

This is used to split the tree between two values. The only important thing is that, if a < b, a <= avg a b < b.

OCaml

Innovation. Community. Security.