package orsetto

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

The signature of the module returned by the Create(B) functor.

type t

Abstract type of a binary search cursor.

val find : (t, 'r) ret -> t cmp -> t -> t -> 'r

Use find r f a b to search for the cursor c between a and b inclusive, for which applying the ordering function f returns zero. If the cursor is found in the search, then r.some is applied to it. Otherwise, r.none () is applied.

Use search f a b to find Some c between a and b inclusive for which applying the ordering function f returns zero. Otherwise, if no such cursor exists, then returns None.

val require : t cmp -> t -> t -> t

Use opt f a b to find the cursor between a and b inclusive for which applying the ordering function f returns zero. Otherwise, if no such cursor exists, then raises Not_found.