[Home] Module Microsoft.FSharp.Compatibility.CompatArray


Operations to manipulate .NET-compatible arrays, only really necessary use when using .NET 1.x.

Values

ValueDescription
val append : 'a [] -> 'a [] -> 'a []
Build a new array that contains the elements of the first array followed by the elements of the second array
val blit : 'a [] -> int -> 'a [] -> int -> int -> unit
Read a range of elements from the first array and write them into the second.
val concat : 'a [] list -> 'a []
Build a new array that contains the elements of each of the given list of arrays
val copy : 'a [] -> 'a []
Build a new array that contains the elements of the given array
val create : int -> 'a -> 'a []
Create a new array of the given length, each entry of which holds the given element
val fill : 'a [] -> int -> int -> 'a -> unit
Fill a range of an array with the given element
val fold_left : ('a -> 'b -> 'a) -> 'a -> '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) -> 'a [] -> 'b -> 'b
Compute f (get arr n) (...(f (get arr n) s))
val get : 'a [] -> int -> 'a
Fetch the given element of the array, indexed by 0
val init : int -> (int -> 'a) -> 'a []
Build a new array whose elements are f 0, ... f N
val iter : ('a -> unit) -> 'a [] -> unit
Execute the given function for each element of the given array
val iteri : (int -> 'a -> unit) -> 'a [] -> unit
Execute the given function for each element of the given array. The integer index indicates the index of the element.
val length : 'a [] -> int
The length of the array
val make : int -> 'a -> 'a []
Build a new array of the given length, each entry of which holds the given element. Same as create.
val map : ('a -> 'b) -> 'a [] -> 'b []
Build a new array whose elements are the results of applying the given function to each of the elements of the array.
val mapi : (int -> 'a -> 'b) -> 'a [] -> 'b []
Build a new array whose elements are the results of applying the given function to each of the elements of the array. The integer index passed to the funciton indicates the index of the element.
val of_array : 'a array -> 'a []
Build a .NET compatible array from the F# array. Note that F# arrays and .NET compatible arrays are only different types when using .NET 1.0 or 1.1
val of_list : 'a list -> 'a []
Convert the given list to a .NET compatible array suitable for passing to .NET functions
val set : 'a [] -> int -> 'a -> unit
Set the given element of the array
val sub : 'a [] -> int -> int -> 'a []
Build a new .NET compatible array that contains the given subrange specified by starting index and length
val to_array : 'a [] -> 'a array
Build an F# array from the given .NET compatible array. Note that F# arrays and .NET compatible arrays are only different types when using .NET 1.0 or 1.1
val to_list : 'a [] -> 'a list
Convert the given .NET compatible array to a list
val zero_create : int -> 'a []
Create a new array filled with zero (null or default) values. Warning: Use of this function may result in subsequent exceptions if the elements of the array are accessed before initialized.

Deprecated Values

ValueDescription
val foreach : 'a [] -> ('a -> unit) -> unit

Deprecated: This member is deprecated. Use "x |> CollectionType.iter" instead.

Execute the given function for each element of the given array
val foreachi : 'a [] -> (int -> 'a -> unit) -> unit

Deprecated: This member is deprecated. Use "CollectionType.iteri" instead.

val transform : 'a [] -> ('a -> 'b) -> 'b []

Deprecated: This member is deprecated. Use "x |> CollectionType.map" instead.

val transformi : 'a [] -> (int -> 'a -> 'b) -> 'b []

Deprecated: This member is deprecated. Use "x |> CollectionType.map" instead.

See Also

Microsoft.FSharp.Compatibility


Documentation for assembly fslib, version 1.1.10.1, generated using F# version 1.1.10.1