Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
RangerRanger - An interval slice for any data structures
val create :
?start:int ->
stop:[ `Inclusive of int | `Exclusive of int ] ->
(int -> 'a) ->
'a tval repeat : times:int -> 'a -> 'a trepeat ~times:3 1 |> to_list is equivalent to 1;1;1
val get : 'a t -> int -> 'aget t i gets the ith element of the range (0 being the first element in the range)
val of_array :
?start:int ->
?stop:[ `Inclusive of int | `Exclusive of int ] ->
'a array ->
'a tCreate a range out of an array
val of_string :
?start:int ->
?stop:[ `Inclusive of int | `Exclusive of int ] ->
string ->
char tCreate a range out of a string
Create a range out of a bytes
val of_list :
?start:int ->
?stop:[ `Inclusive of int | `Exclusive of int ] ->
'a list ->
'a tCreate a range out of a list
val to_list : 'a t -> 'a listval to_string : char t -> stringval iter : 'a t -> f:('a -> unit) -> unitval iteri : 'a t -> f:(int -> 'a -> unit) -> unitval bounds : 'a t -> int * intbounds t returns the first and last index in the range corresponding to the value the range was created from
val for_all : 'a t -> f:('a -> bool) -> boolfor_all t ~f returns true if f returns true for every element spanned by t. false otherwise
val length : 'a t -> intval is_empty : 'a t -> boolval fold_left : 'a t -> init:'b -> f:('b -> 'a -> 'b) -> 'bval fold_right : 'a t -> f:('a -> 'b -> 'b) -> init:'b -> 'bval reduce : 'a t -> f:('a -> 'a -> 'a) -> 'a optionval hd : 'a t -> 'a optionval hd_exn : 'a t -> 'aval mid : 'a t -> [ `One of 'a | `Two of 'a * 'a ] option