[Home] Module Microsoft.FSharp.Collections.ResizeArray


Generic operations on the type System.Collections.Generic.List, which is called ResizeArray in the F# libraries.

Values

ValueDescription
val append : ResizeArray<'a> -> ResizeArray<'a> -> ResizeArray<'a>
Build a new array that contains the elements of the first array followed by the elements of the second array
val blit : ResizeArray<'a> -> int -> ResizeArray<'a> -> int -> int -> unit
Read a range of elements from the first array and write them into the second.
val choose : ('a -> 'b option) -> ResizeArray<'a> -> ResizeArray<'b>
Apply the given function to each element of the array. Return the array comprised of the results "x" for each element where the function returns Some(x)
val combine : ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'a * 'b>
Combine the two arrays into an array of pairs. The two arrays must have equal lengths.
val concat : ResizeArray<'a> list -> ResizeArray<'a>
Build a new array that contains the elements of each of the given list of arrays
val copy : ResizeArray<'a> -> ResizeArray<'a>
Build a new array that contains the elements of the given array
val create : int -> 'a -> ResizeArray<'a>
Create an array whose elements are all initially the given value.
val exists : ('a -> bool) -> ResizeArray<'a> -> bool
Test if any element of the array satisfies the given predicate. If the elements are "i0...iN" then computes "p i0 or ... or p iN".
val fill : ResizeArray<'a> -> int -> int -> 'a -> unit
Fill a range of the collection with the given element
val filter : ('a -> bool) -> ResizeArray<'a> -> ResizeArray<'a>
Return a new collection containing only the elements of the collection for which the given predicate returns "true"
val find : ('a -> bool) -> ResizeArray<'a> -> 'a
Return the first element for which the given function returns "true". Raise Not_found if no such element exists.
val first : ('a -> 'b option) -> ResizeArray<'a> -> 'b option
Apply the given function to successive elements, returning the first result where function returns "Some(x)" for some x.
val fold_left : ('a -> 'b -> 'a) -> 'a -> ResizeArray<'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) -> ResizeArray<'a> -> 'b -> 'b
Apply a function to each element of the array, threading an 'accumulator' argument through the computation. If the elements are "i0...iN" then computes "f i0 (...(f iN s))".
val for_all : ('a -> bool) -> ResizeArray<'a> -> bool
Test if all elements of the array satisfy the given predicate. If the elements are "i0...iN" and "j0...jN" then computes "p i0 && ... && p iN".
val get : ResizeArray<'a> -> int -> 'a
Fetch an element from the collection. You can also use the syntax arr.[idx].
val init : int -> (int -> 'a) -> ResizeArray<'a>
Create an array by calling the given generator on each index.
val iter : ('a -> unit) -> ResizeArray<'a> -> unit
Apply the given function to each element of the array.
val iter2 : ('a -> 'b -> unit) -> ResizeArray<'a> -> ResizeArray<'b> -> unit
Apply the given function to two arrays simultaneously. The two arrays must have the same lengths, otherwise an Invalid_argument exception is raised.
val iteri : (int -> 'a -> unit) -> ResizeArray<'a> -> unit
Apply the given function to each element of the array. The integer passed to the function indicates the index of element.
val length : ResizeArray<'a> -> int
Return the length of the collection. You can also use property arr.Length.
val map : ('a -> 'b) -> ResizeArray<'a> -> ResizeArray<'b>
Build a new array whose elements are the results of applying the given function to each of the elements of the array.
val map2 :
  ('a -> 'b -> 'c) -> ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'c>
Build a new collection whose elements are the results of applying the given function to the corresponding elements of the two collections pairwise. The two input arrays must have the same lengths.
val mapi : (int -> 'a -> 'b) -> ResizeArray<'a> -> ResizeArray<'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 function indicates the index of element being transformed.
val of_list : 'a list -> ResizeArray<'a>
Build an array from the given list
val partition :
  ('a -> bool) -> ResizeArray<'a> -> ResizeArray<'a> * ResizeArray<'a>
Split the collection into two collections, containing the elements for which the given predicate returns "true" and "false" respectively
val rev : ResizeArray<'a> -> ResizeArray<'a>
Return a new array with the elements in reverse order
val set : ResizeArray<'a> -> int -> 'a -> unit
Set the value of an element in the collection. You can also use the syntax 'arr.[idx] <- e'.
val split : ResizeArray<'a * 'b> -> ResizeArray<'a> * ResizeArray<'b>
Split a list of pairs into two lists
val sub : ResizeArray<'a> -> int -> int -> ResizeArray<'a>
Build a new array that contains the given subrange specified by starting index and length.
val to_list : ResizeArray<'a> -> 'a list
Build a list from the given array
val tryfind : ('a -> bool) -> ResizeArray<'a> -> 'a option
Return the first element for which the given function returns "true". Return None if no such element exists.

Deprecated/Unsafe Type Definitions

TypeDescription
type t

Note: Consider using the type ResizeArray<_> instead

Note: an abbreviation for ResizeArray<'a>

See Also

Microsoft.FSharp.Collections


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