[Home] Module Microsoft.FSharp.Compatibility.FSharp.ReadonlyArray


Values

ValueDescription
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

Deprecated/Unsafe Type Definitions

TypeDescription
type t

Note: Consider using the ReadonlyArray<_> type instead

Note: an abbreviation for ReadonlyArray<'a>

Deprecated Values

ValueDescription
[<Obsolete ("Use of_seq instead")>]
val of_ICollection : #ICollection<'a> -> ReadonlyArray<'a>

Note: Use of_seq instead

Build a new collection from any type that supports the .NET ICollection interface
[<Obsolete ("Consider using of_seq instead")>]
val of_IEnumerable : #IEnumerable<'a> -> ReadonlyArray<'a>

Note: Consider using of_seq instead

Build a new collection from the given enumerable object
[<Obsolete ("This function has been renamed of_ResizeArray")>]
val of_List : List<'a> -> ReadonlyArray<'a>

Note: This function has been renamed of_ResizeArray

[<Obsolete ("Consider using to_seq instead")>]
val to_IEnumerable : ReadonlyArray<'a> -> IEnumerable<'a>

Note: Consider using to_seq instead

Return a view of the collection as an enumerable object
[<Obsolete ("This function has been renamed to_ResizeArray")>]
val to_List : ReadonlyArray<'a> -> List<'a>

Note: This function has been renamed to_ResizeArray

See Also

Microsoft.FSharp.Compatibility.FSharp


Documentation for assembly FSharp.Compatibility, version 1.9.4.19, generated using F# version 1.9.4.19