package owee

  1. Overview
  2. Docs
type 'a interval = {
  1. lbound : int;
  2. rbound : int;
  3. value : 'a;
}
val interval : int64 -> int64 -> 'a -> 'a interval
type 'a t
Constructors
val create : int -> f:(int -> 'a interval) -> 'a t

create count f : returns a new interval map which contains count intervals, returned by f i where i is from 0 to count - 1.

  • raises Invalid_argument

    if count < 0 or count > Sys.max_array_length.

Query
val query : 'a t -> Int64.t -> 'a interval list

query t q : list of intervals in t containing the Int64.t q

val iter : 'a t -> f:('a interval -> unit) -> unit

iter t ~f applies f to each interval that has been added to t. Traversal order is not specified.

OCaml

Innovation. Community. Security.