c array Array.map2 f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(Array.length a -1) b.(Array.length b -1)|], Raise Invalid_argument if the arrays are not the same size. Since: 4.03 ,

> 'a array -> bool Array.for_all p [|a1; ...; an|] checks if all elements of the array satisfy the predicate p. That is, it returns, a1) && (p a2) && ... && (p an) ,

> 'a array -> bool Array.exists p [|a1; ...; an|] checks if at least one element of the array satisfies the predicate p. That is, it returns, a1) || (p a2) || ... || (p an) ,

array -> bool mem a l is true if and only if a is equal to an element of l ,

array -> bool Same as Array.mem[24.2], but uses physical equality instead of structural equality to compare array elements ,

sub a start len returns a fresh array of length len, containing the elements number start to start + len -1 of array a ,

src_pos:int -> dst:'a array -> dst_pos:int -> len:int -> unit Array.blit v1 o1 v2 o2 len copies len elements from array v1, starting at element number o1, to array v2, starting at element number o2, It works correctly even if v1 and v2 are the same array, and the source and destination chunks overlap ,

a array -> 'a list Array.to_list a returns the list of all the elements of a ,

a list -> 'a array Array.of_list l returns a fresh array containing the elements of l ,

> 'a array -> unit Array.iter f a applies function f in turn to all the elements of a. It is equivalent to f a ,

f:(int -> 'a -> unit) -> 'a array -> unit Same as Array.iter[24.2], but the function is applied to the index of the element as first argument, and the element itself as second argument ,

f:(int -> 'a -> 'b) -> 'a array -> 'b array Same as Array.map[24.2], but the function is applied to the index of the element as first argument, and the element itself as second argument ,

> init:'a -> 'b array -> 'a Array ,

> 'b array -> init:'a -> 'a Array, ) ( ... (f a.(n-1) x) ...)), where n is the length of the array a ,

c array Array.map2 f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(Array.length a -1) b.(Array.length b -1)|], Raise Invalid_argument if the arrays are not the same size. Since: 4.05 ,

a -> set:'a array -> bool mem x a is true if and only if x is equal to an element of a ,

a -> set:'a array -> bool Same as Array.mem[24.2], but uses physical equality instead of structural equality to compare list elements ,

int -> float array Array.create_float n returns a fresh float array of length n, with uninitialized data. Since: 4.03 an ephemeron with two keys val create : unit -> ('k1, 'k2 ,

('k1, 'k2, 'd) t -> unit Same as Ephemeron ,

('k1, 'k2, 'd) t -> bool Same as Ephemeron ,

('k1, 'k2, 'd) t -> unit Same as Ephemeron ,

('k1, 'k2, 'd) t -> bool Same as Ephemeron ,

b) t -> ('k1, 'c, 'd) t -> unit Same as Ephemeron ,

k2, 'b) t -> ('c, 'k2, 'd) t -> unit Same as Ephemeron ,

('k, 'd) t -> int -> unit Same as Ephemeron ,

('k, 'd) t -> int -> bool Same as Ephemeron ,

a) t -> int -> ('k, 'b) t -> int -> int -> unit Same as Ephemeron ,

d) t -> unit Same as Ephemeron.K1.blit_data[24.11] module Make : functor (H : Hashtbl.HashedType) -> Ephemeron.S with type key = H.t array val rev ,

(int -> 'a) -> 'a list List.init len f is f 0; f 1; ...; f (len-1), evaluated left to right ,

The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list) ,

> 'a list -> unit List.iter f [a1; ...; an] applies function f in turn to a1; ...; an. It is equivalent to begin f a1; f a2 ,

> 'a list -> unit Same as List.iter[24.21], but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument ,

> 'a list -> 'b list List.map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1 ,

> 'a list -> 'b list Same as List.map[24.21], but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument ,

Return the first element of the given list. Raise Failure "hd" if the list is empty ,

list -> int Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after itering on the shortest list ,

len:int -> int Compare the length of a list to an integer. compare_length_with l n is equivalent to compare (length l) n, except that the computation stops after at most n iterations on the list ,

Return the n-th element of the given list. The first element (head of the list) is at position 0. Raise Failure "nth" if the list is too short ,

a option Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short. Raise Invalid_argument "List.nth" if n is negative, pp.4-05 ,

(int -> 'a) -> 'a list List.init len f is f 0; f 1; ...; f (len-1), evaluated left to right ,

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (List.rev[24.21] l1) @ l2, but rev_append is tail-recursive and more efficient ,

The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list) ,

> 'a list -> unit List.iter f [a1; ...; an] applies function f in turn to a1; ...; an. It is equivalent to begin f a1; f a2 ,

> 'a list -> unit Same as List.iter[24.21], but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument ,

> 'a list -> 'b list Same as List.map[24.21], but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument ,

> 'a list -> 'b list List.rev_map f l gives the same result as List l), but is tail-recursive and more efficient ,

unit -> int * process_status Wait until one of the children processes die, and return its pid and termination status. On Windows: Not implemented ,

int -> int * process_status Same as Unix.wait[26.1], but waits for the child process whose pid is given. A pid of -1 means wait for any child. A pid of 0 means wait for any child in the same process group as the current process. Negative pid arguments represent process groups, The list of options indicates whether waitpid should return immediately without waiting, and whether it should report stopped children ,

out_channel Same as Unix.open_process_in[26.1], but redirect the standard input of the command to a pipe. Data written to the returned output channel is sent to the standard input of the command. Warning: writes on output channels are buffered, hence be careful to call Pervasives ,

split[28.1], but splits into at most n substrings ,

regexp -> string -> int -> string list Same as Str.bounded_split[28.1], but occurrences of the delimiter at the beginning and at the end of the string are recognized and returned as empty strings in the result ,

regexp -> string -> int -> split_result list Same as Str.bounded_split_delim[28.1], but returns the delimiters as well as the substrings contained between delimiters. The former are tagged Delim in the result list ,

This implementation performs time-sharing and context switching at the level of the OCaml virtual machine (bytecode interpreter) It is available on Unix systems, and supports only bytecode programs. It cannot be used with native-code programs ,

file_descr -> bytes -> int -> int -> float -> int Behave as ThreadUnix.read[29.5] and ThreadUnix.write[29.5], except that Unix_error(ETIMEDOUT,_,_) is raised if no data is available for reading or ready for writing after d seconds. The delay d is given in the fifth argument ,

file_descr -> string -> int -> int -> float -> int See ThreadUnix ,

file_descr list * Unix.file_descr list Pipes and redirections val pipe : ?cloexec:bool -> unit -> Unix.file_descr * Unix.file_descr val open_process_in : string -> Pervasives.in_channel val open_process_out : string -> Pervasives.out_channel val open_process : string -> Pervasives.in_channel * Pervasives.out_channel Time val sleep : int -> unit Sockets val socket : ?cloexec:bool -> Unix.socket_domain -> Unix.socket_type -> int -> Unix.file_descr val accept : ?cloexec:bool -> Unix.file_descr -> Unix.file_descr * Unix.sockaddr val connect : Unix.file_descr -> Unix.sockaddr -> unit val recv : Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag list -> int val recvfrom : Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag list -> int * Unix.sockaddr val send : Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag list -> int val send_substring : Unix.file_descr -> string -> int -> int -> Unix.msg_flag list -> int val sendto : Unix.file_descr -> bytes -> int -> int -> Unix, msg_flag list -> Unix.sockaddr -> int val sendto_substring : Unix.file_descr -> string -> int -> int -> Unix.msg_flag list -> Unix.sockaddr -> int val open_connection : Unix.sockaddr -> Pervasives.in_channel * Pervasives.out_channel Resize and erase the graphics window ,

int -> int -> int -> color rgb r g b returns the integer encoding the color with red component r, green component g, and blue component b. r, g and b are in the range 0 ,

int -> int -> int -> int -> unit fill_rect x y w h fills the rectangle with lower left corner at x,y, width w and height h, with the current color ,

(int * int) array -> unit Fill the given polygon with the current color. The array contains the coordinates of the vertices of the polygon ,

int -> int -> int -> int -> int -> int -> unit Fill an elliptical pie slice with the current color. The parameters are the same as for Graphics ,

int -> int -> int -> int -> unit Fill an ellipse with the current color. The parameters are the same as for Graphics ,

int -> int -> int -> unit Fill a circle with the current color. The parameters are the same as for Graphics ,

float32_elt = | Float32_elt contents of the big array. Its constructors list all possible associations of OCaml types with element kinds, and are re-exported below for backward-compatibility reasons ,

As shown by the types of the values above, big arrays of kind float32_elt and float64_elt are accessed using the OCaml type float Big arrays of complex kinds complex32_elt, complex64_elt are accessed with the OCaml type Complex.t[24.9]. Big arrays of integer kinds are accessed using the smallest OCaml integer type large enough to represent the array elements: int for 8-and 16-bit integer bigarrays, as well as OCaml-integer bigarrays; int32 for 32-bit integer bigarrays; int64 for 64-bit integer bigarrays; and nativeint for platform-native integer bigarrays. Finally, big arrays of kind int8_unsigned_elt can also be accessed as arrays of characters instead of arrays of small integers ,

b) kind -> int kind_size_in_bytes k is the number of bytes used to store an element of type k ,

fortran_layout = | Fortran_layout_typ To facilitate interoperability with existing C and Fortran code, this library supports two different memory layouts for big arrays, one compatible with the C conventions ,

Bigarray.c_layout) t -> int array -> ('a ,

Bigarray.fortran_layout) t -> int array -> ('a ,

c) t -> unit Copy all elements of a big array in another big array. Genarray.blit src dst copies all elements of src into dst. Both arrays src and dst must have the same number of dimensions and equal dimensions. Copying a sub-array of src to a sub-array of dst can be achieved by applying Genarray ,

file_descr -> ?pos:int64 -> ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> bool -> int array -> ('a ,

c) t -> int size_in_bytes a is the number of elements in a multiplied by a's Bigarray ,

c) Bigarray.Array0.t Extract a scalar (zero-dimensional slice) of the given one-dimensional big array. The integer parameter is the index of the scalar to extract. See Bigarray ,

c) t -> ('a, 'b, 'c) t -> unit Copy the first big array to the second big array ,

c) t -> int Return the first dimension of the given two-dimensional big array ,

c) t -> int Return the second dimension of the given two-dimensional big array ,

c) t -> int size_in_bytes a is the number of elements in a multiplied by a's Bigarray ,

Bigarray.c_layout) t -> int -> int -> ('a ,

c) t -> int size_in_bytes a is the number of elements in a multiplied by a's Bigarray ,

c) t -> int -> int -> int -> 'a -> unit Array3.set a x y v, or alternatively a.{x,y,z} <-v, stores the value v at coordinates (x, y, z) in a. x, y and z must be within the bounds of a ,

Bigarray.c_layout) t -> int -> int -> ('a ,

Bigarray.fortran_layout) t -> int -> int -> ('a ,

Bigarray.c_layout) t -> int -> int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t val map_file : Unix.file_descr -> ?pos:int64 -> ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> bool -> int -> int -> int -> ,

c) t -> int -> int -> int -> 'a -> unit Like Bigarray.Array3.set[32.1], but bounds checking is not always performed. end Three-dimensional arrays. The Array3 structure provides operations similar to those of Bigarray ,

c) Array1.t -> ('a, 'b, 'c) Genarray.t Return the generic big array corresponding to the given one-dimensional big array ,

c) Array2.t -> ('a, 'b, 'c) Genarray.t Return the generic big array corresponding to the given two-dimensional big array ,

c) Array3.t -> ('a, 'b, 'c) Genarray.t Return the generic big array corresponding to the given three-dimensional big array ,

c) Genarray.t -> ('a, 'b, 'c) Array0.t Specialized version of Bigarray.reshape[32.1] for reshaping to zero-dimensional arrays ,

c) Genarray.t -> int -> ('a, 'b, 'c) Array1.t Specialized version of Bigarray ,

c) Genarray.t -> int -> int -> ('a, 'b, 'c) Array2.t Specialized version of Bigarray ,

c) Genarray.t -> int -> int -> int -> ('a, 'b, 'c) Array3.t Specialized version of Bigarray ,