package core_extended

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

A simple representation of a contiguous interval in some type.

type 'k t = [
  1. | `Always
  2. | `From of 'k
  3. | `Until of 'k
  4. | `Between of 'k * 'k
]

An interval on a key type which can be open (extend to ±infinity) at either end.

include sig ... end
val t_of_sexp : (Sexplib.Sexp.t -> 'k) -> Sexplib.Sexp.t -> 'k t
val __t_of_sexp__ : (Sexplib.Sexp.t -> 'k) -> Sexplib.Sexp.t -> 'k t
val sexp_of_t : ('k -> Sexplib.Sexp.t) -> 'k t -> Sexplib.Sexp.t
val is_empty : 'k t -> cmp:('k -> 'k -> int) -> bool

Identify whether an interval is empty.

val contains : 'k t -> cmp:('k -> 'k -> int) -> 'k -> bool

Check whether an interval contains a specific key.

OCaml

Innovation. Community. Security.