| Value | Description |
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 exists2 :
('a -> 'b -> bool) -> ResizeArray<'a> -> ResizeArray<'b> -> bool |
Test elements of the two arrays pairwise to see if any pair of element satisfies the given predicate.
Raise ArgumentException if the arrays have different lengths.
|
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 KeyNotFoundException if no such element exists.
|
val find_index : ('a -> bool) -> ResizeArray<'a> -> int |
Return the index of the first element in the array
that satisfies the given predicate. Raise KeyNotFoundException if
none of the elements satisy the predicate.
|
val find_indexi : (int -> 'a -> bool) -> ResizeArray<'a> -> int |
Return the index of the first element in the array
that satisfies the given predicate. Raise KeyNotFoundException if
none of the elements satisy the predicate.
|
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_left2 :
('state -> 'b1 -> 'b2 -> 'state) -> 'state -> ResizeArray<'b1> ->
ResizeArray<'b2> -> 'state |
Apply a function to pairs of elements drawn from the two collections,
left-to-right, threading an accumulator argument
through the computation. The two input
arrays must have the same lengths, otherwise an ArgumentException is
raised.
|
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 fold_right2 :
('a1 -> 'a2 -> 'b -> 'b) -> ResizeArray<'a1> -> ResizeArray<'a2> ->
'b -> 'b |
Apply a function to pairs of elements drawn from the two collections, right-to-left,
threading an accumulator argument through the computation. The two input
arrays must have the same lengths, otherwise an ArgumentException is
raised.
|
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 for_all2 :
('a -> 'b -> bool) -> ResizeArray<'a> -> ResizeArray<'b> -> bool |
Test elements of the two arrays pairwise to see if all pairs of elements satisfy the given predicate.
Raise ArgumentException if the arrays have different lengths.
|
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 is_empty : ResizeArray<'a> -> bool |
Return true if the given array is empty, otherwise false
|
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 iteri2 :
(int -> 'a -> 'b -> unit) -> ResizeArray<'a> -> ResizeArray<'b> ->
unit |
Apply the given function to pair of elements drawn from matching indices in two arrays,
also passing the index of the elements. The two arrays must have the same lengths,
otherwise an ArgumentException is raised.
|
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 mapi2 :
(int -> '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, otherwise an ArgumentException is
raised.
|
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 reduce_left : ('a -> 'a -> 'a) -> ResizeArray<'a> -> 'a |
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 (... (f i0 i1)...) iN
Raises ArgumentException if the array has size zero.
|
val reduce_right : ('a -> 'a -> 'a) -> ResizeArray<'a> -> 'a |
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-1 iN))"
Raises ArgumentException if the array has size zero.
|
val rev : ResizeArray<'a> -> ResizeArray<'a> |
Return a new array with the elements in reverse order
|
val scan_left :
('b -> 'a -> 'b) -> 'b -> ResizeArray<'a> -> ResizeArray<'b> |
Like fold_left, but return the intermediary and final results
|
val scan_right :
('a -> 'c -> 'c) -> ResizeArray<'a> -> 'c -> ResizeArray<'c> |
Like fold_right, but return both the intermediary and final results
|
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 singleton : 'a -> ResizeArray<'a> |
Return an array containing the given element
|
val sort : ('a -> 'a -> int) -> ResizeArray<'a> -> unit |
Sort the elements using the given comparison function
|
val sort_by : ('a -> 'key) -> ResizeArray<'a> -> unit |
Sort the elements using the key extractor and generic comparison on the keys
|
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 to_seq : ResizeArray<'a> -> seq<'a> |
Return a view of the array as an enumerable object
|
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.
|
val tryfind_index : ('a -> bool) -> ResizeArray<'a> -> int option |
Return the index of the first element in the array
that satisfies the given predicate.
|
val tryfind_indexi : (int -> 'a -> bool) -> ResizeArray<'a> -> int option |
Return the index of the first element in the array
that satisfies the given predicate.
|
val unzip :
ResizeArray<'a * 'b> -> ResizeArray<'a> * ResizeArray<'b> |
Split an array of pairs into two arrays
|
val zip :
ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'a * 'b> |
Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is
raised..
|