NS.IArrayIArray - Immutable view of an array
Note that an iarray can be constructed from an array without copying, and the client might keep other references to the backing array and use them to later modify it. So IArray is not a safe immutable data structure, it only attempts to make it inconvenient to unintentionally mutate.
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a tval compare :
'a Base__Ppx_compare_lib.compare ->
'a t Base__Ppx_compare_lib.compareinclude Ppx_compare_lib.Equal.S1 with type 'a t := 'a tval equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equalmodule Import : sig ... endval pp :
(unit, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
'a t ->
unitval to_array : 'a t -> 'a arrayto_array v is the array backing v, no copy is performed.
val of_array : 'a array -> 'a tof_array a is an iarray that shares its representation with array a, therefore mutating a changes of_array a. The intended use for of_array is for converting an array to an iarray when the array will not be used after conversion, or with care for multi-step initialization of an iarray.
val empty : 'a tval of_ : 'a -> 'a tval of_iter : (('a -> unit) -> unit) -> 'a tval of_list : 'a list -> 'a tval of_list_rev : 'a list -> 'a tval init : int -> f:(int -> 'a) -> 'a tLike map, but specialized to require f to be an endofunction, which enables preserving == if f preserves == of every element.
val is_empty : 'a t -> boolval length : 'a t -> intval get : 'a t -> int -> 'aval to_iter : 'a t -> ('a -> unit) -> unitval iter : 'a t -> f:('a -> unit) -> unitval iteri : 'a t -> f:(int -> 'a -> unit) -> unitval exists : 'a t -> f:('a -> bool) -> boolval find : f:('a -> bool) -> 'a t -> 'a optionval find_map : 'a t -> f:('a -> 'b option) -> 'b optionval mem : 'a -> 'a t -> eq:('a -> 'a -> bool) -> boolval for_all : 'a t -> f:('a -> bool) -> boolval fold : 'a t -> 's -> f:('a -> 's -> 's) -> 'sval fold_right : 'a t -> 's -> f:('a -> 's -> 's) -> 's