Module Ia

Types and Values

type 'a t = private 'a array

The type of immutable arrays.

val empty : 'a t

The empty array.

val of_array : 'a array -> 'a t

(of_array a) converts a mutable 'a array to an immutable 'a t.

val (!) : 'a array -> 'a t

(!) is of_array.

The remainder of these functions are identical to those in Prelude.Array except that they are immutable.

val get : 'a t -> int -> 'a
val init : int -> (int -> 'a) -> 'a t
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val sub : 'a t -> int -> int -> 'a t
val length : 'a t -> int
val len : 'a t -> int
val make : int -> 'a -> 'a t
val create_float : int -> float t
val make_matrix : int -> int -> 'a -> 'a t t
val append : 'a t -> 'a t -> 'a t
val concat : 'a t list -> 'a t
val copy : 'a t -> 'a t
val to_list : 'a t -> 'a list
val of_list : 'a list -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold_right : ('b -> 'a -> 'a) -> 'b t -> 'a -> 'a
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool
val mem : 'a -> 'a t -> bool
val memq : 'a -> 'a t -> bool
val foldl : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val foldr : ('a -> 'b -> 'b) -> 'b -> 'a t -> 'b
val random : ?size:(unit -> int) -> (unit -> 'a) -> unit -> 'a t