Value | Description |
val append : ReadonlyArray<'a> -> ReadonlyArray<'a> -> ReadonlyArray<'a> |
"append a1 a2" is equivalent to "[|a1.(0);...;a1.(n-1);a2.(0);...;a2.(m-1)|]"
where "n" is the length of "a1" and "m" is the length of "a2".
|
val concat : ReadonlyArray<'a> list -> ReadonlyArray<'a> |
"concat" is similar to [append] but conjoins a list of read-only array. Only
one new roarray is allocated.
|
val fold_left : ('a -> 'b -> 'a) -> 'a -> ReadonlyArray<'b> -> 'a |
Apply a function to each element of the collection, threading an 'accumulator' argument
through the computation. If the elements are "i0...iN" then computes "f (... (f s i0)...) iN"
|
val fold_right : ('a -> 'b -> 'b) -> ReadonlyArray<'a> -> 'b -> 'b |
Apply a function to each element of the collection, threading an 'accumulator' argument
through the computation. If the elements are "i0...iN" then computes "f i0 (...(f iN s))".
|
val get : ReadonlyArray<'a> -> int -> 'a |
Get an element from a read-only array
|
val init : int -> (int -> 'a) -> ReadonlyArray<'a> |
Create a read-only array by index
"init n f" creates the roarray "[| f 0; ...; f (n-1) |]".
|
val iter : ('a -> unit) -> ReadonlyArray<'a> -> unit |
Apply the given function to each element of the collection.
|
val iteri : (int -> 'a -> unit) -> ReadonlyArray<'a> -> unit |
Apply the given function to each element of the collection. The integer passed to the
function indicates the index of element.
|
val length : ReadonlyArray<'a> -> int |
Get the length of a read-only array
|
val map : ('a -> 'b) -> ReadonlyArray<'a> -> ReadonlyArray<'b> |
Build a new collection whose elements are the results of applying the given function
to each of the elements of the collection.
|
val mapi : (int -> 'a -> 'b) -> ReadonlyArray<'a> -> ReadonlyArray<'b> |
Build a new collection whose elements are the results of applying the given function
to each of the elements of the collection. The integer index passed to the
function indicates the index of element being transformed.
|
val of_list : 'a list -> ReadonlyArray<'a> |
Build a collection from the given list
|
val of_ResizeArray : ResizeArray<'a> -> ReadonlyArray<'a> | |
val of_seq : #seq<'a> -> ReadonlyArray<'a> |
Build a new collection from the given enumerable object
|
val sub : ReadonlyArray<'a> -> int -> int -> ReadonlyArray<'a> |
"sub a n m" is equivalent to "[| a.(n); ...; a.(n+m) |]".
|
val to_ICollection : ReadonlyArray<'a> -> ICollection<'a> |
Return a view of the collection as a .NET collection
|
val to_list : ReadonlyArray<'a> -> 'a list |
Build a list from the given collection
|
val to_ResizeArray : ReadonlyArray<'a> -> ResizeArray<'a> | |
val to_seq : ReadonlyArray<'a> -> seq<'a> |
Return a view of the collection as an enumerable object
|