FSharpx.Collections


ResizeArray Module

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

Functions and values

Function or value Description

ResizeArray.append arg1 arg2

Full Usage: ResizeArray.append arg1 arg2

Parameters:
    arg0 : ResizeArray<'T>
    arg1 : ResizeArray<'T>

Returns: ResizeArray<'T>

Build a new array that contains the elements of the first array followed by the elements of the second array

arg0 : ResizeArray<'T>
arg1 : ResizeArray<'T>
Returns: ResizeArray<'T>

ResizeArray.blit arg1 arg2 arg3 arg4 arg5

Full Usage: ResizeArray.blit arg1 arg2 arg3 arg4 arg5

Parameters:
    arg0 : ResizeArray<'T>
    arg1 : int
    arg2 : ResizeArray<'T>
    arg3 : int
    arg4 : int

Read a range of elements from the first array and write them into the second.

arg0 : ResizeArray<'T>
arg1 : int
arg2 : ResizeArray<'T>
arg3 : int
arg4 : int

ResizeArray.choose arg1 arg2

Full Usage: ResizeArray.choose arg1 arg2

Parameters:
    arg0 : 'T -> 'U option
    arg1 : ResizeArray<'T>

Returns: ResizeArray<'U>

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)

arg0 : 'T -> 'U option
arg1 : ResizeArray<'T>
Returns: ResizeArray<'U>

ResizeArray.concat arg1

Full Usage: ResizeArray.concat arg1

Parameters:
    arg0 : seq<ResizeArray<'T>>

Returns: ResizeArray<'T>

Build a new array that contains the elements of each of the given list of arrays

arg0 : seq<ResizeArray<'T>>
Returns: ResizeArray<'T>

ResizeArray.copy arg1

Full Usage: ResizeArray.copy arg1

Parameters:
    arg0 : ResizeArray<'T>

Returns: ResizeArray<'T>

Build a new array that contains the elements of the given array

arg0 : ResizeArray<'T>
Returns: ResizeArray<'T>

ResizeArray.create arg1 arg2

Full Usage: ResizeArray.create arg1 arg2

Parameters:
    arg0 : int
    arg1 : 'T

Returns: ResizeArray<'T>

Create an array whose elements are all initially the given value.

arg0 : int
arg1 : 'T
Returns: ResizeArray<'T>

ResizeArray.distinct arg1

Full Usage: ResizeArray.distinct arg1

Parameters:
    arg0 : ResizeArray<'T>

Returns: ResizeArray<'T>

Returns an array that contains no duplicate entries according to generic hash and equality comparisons on the entries. If an element occurs multiple times in the array then the later occurrences are discarded.

arg0 : ResizeArray<'T>
Returns: ResizeArray<'T>

ResizeArray.distinctBy arg1 arg2

Full Usage: ResizeArray.distinctBy arg1 arg2

Parameters:
    arg0 : 'T -> 'Key
    arg1 : ResizeArray<'T>

Returns: ResizeArray<'T>

Returns an array that contains no duplicate entries according to the generic hash and equality comparisons on the keys returned by the given key-generating function. If an element occurs multiple times in the array then the later occurrences are discarded.

arg0 : 'T -> 'Key
arg1 : ResizeArray<'T>
Returns: ResizeArray<'T>

ResizeArray.exists arg1 arg2

Full Usage: ResizeArray.exists arg1 arg2

Parameters:
    arg0 : 'T -> bool
    arg1 : ResizeArray<'T>

Returns: bool

Test if any element of the array satisfies the given predicate. If the input function is f and the elements are i0...iN then computes p i0 or ... or p iN.

arg0 : 'T -> bool
arg1 : ResizeArray<'T>
Returns: bool

ResizeArray.exists2 arg1 arg2 arg3

Full Usage: ResizeArray.exists2 arg1 arg2 arg3

Parameters:
    arg0 : 'T1 -> 'T2 -> bool
    arg1 : ResizeArray<'T1>
    arg2 : ResizeArray<'T2>

Returns: 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.

arg0 : 'T1 -> 'T2 -> bool
arg1 : ResizeArray<'T1>
arg2 : ResizeArray<'T2>
Returns: bool

ResizeArray.fill arg1 arg2 arg3 arg4

Full Usage: ResizeArray.fill arg1 arg2 arg3 arg4

Parameters:
    arg0 : ResizeArray<'T>
    arg1 : int
    arg2 : int
    arg3 : 'T

Fill a range of the collection with the given element

arg0 : ResizeArray<'T>
arg1 : int
arg2 : int
arg3 : 'T

ResizeArray.filter arg1 arg2

Full Usage: ResizeArray.filter arg1 arg2

Parameters:
    arg0 : 'T -> bool
    arg1 : ResizeArray<'T>

Returns: ResizeArray<'T>

Return a new collection containing only the elements of the collection for which the given predicate returns true

arg0 : 'T -> bool
arg1 : ResizeArray<'T>
Returns: ResizeArray<'T>

ResizeArray.find arg1 arg2

Full Usage: ResizeArray.find arg1 arg2

Parameters:
    arg0 : 'T -> bool
    arg1 : ResizeArray<'T>

Returns: 'T

Return the first element for which the given function returns true. Raise KeyNotFoundException if no such element exists.

arg0 : 'T -> bool
arg1 : ResizeArray<'T>
Returns: 'T

ResizeArray.findIndex arg1 arg2

Full Usage: ResizeArray.findIndex arg1 arg2

Parameters:
    arg0 : 'T -> bool
    arg1 : ResizeArray<'T>

Returns: int

Return the index of the first element in the array that satisfies the given predicate. Raise KeyNotFoundException if none of the elements satisfy the predicate.

arg0 : 'T -> bool
arg1 : ResizeArray<'T>
Returns: int

ResizeArray.findIndexi arg1 arg2

Full Usage: ResizeArray.findIndexi arg1 arg2

Parameters:
    arg0 : int -> 'T -> bool
    arg1 : ResizeArray<'T>

Returns: int

Return the index of the first element in the array that satisfies the given predicate. Raise KeyNotFoundException if none of the elements satisfy the predicate.

arg0 : int -> 'T -> bool
arg1 : ResizeArray<'T>
Returns: int

ResizeArray.fold arg1 arg2 arg3

Full Usage: ResizeArray.fold arg1 arg2 arg3

Parameters:
    arg0 : 'T -> 'State -> 'T
    arg1 : 'T
    arg2 : ResizeArray<'State>

Returns: 'T

Apply a function to each element of the collection, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f (... (f s i0)...) iN

arg0 : 'T -> 'State -> 'T
arg1 : 'T
arg2 : ResizeArray<'State>
Returns: 'T

ResizeArray.fold2 arg1 arg2 arg3 arg4

Full Usage: ResizeArray.fold2 arg1 arg2 arg3 arg4

Parameters:
    arg0 : 'State -> 'T1 -> 'T2 -> 'State
    arg1 : 'State
    arg2 : ResizeArray<'T1>
    arg3 : ResizeArray<'T2>

Returns: '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.

arg0 : 'State -> 'T1 -> 'T2 -> 'State
arg1 : 'State
arg2 : ResizeArray<'T1>
arg3 : ResizeArray<'T2>
Returns: 'State

ResizeArray.foldBack arg1 arg2 arg3

Full Usage: ResizeArray.foldBack arg1 arg2 arg3

Parameters:
    arg0 : 'T -> 'State -> 'State
    arg1 : ResizeArray<'T>
    arg2 : 'State

Returns: 'State

Apply a function to each element of the array, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f i0 (...(f iN s)).

arg0 : 'T -> 'State -> 'State
arg1 : ResizeArray<'T>
arg2 : 'State
Returns: 'State

ResizeArray.foldBack2 arg1 arg2 arg3 arg4

Full Usage: ResizeArray.foldBack2 arg1 arg2 arg3 arg4

Parameters:
    arg0 : 'T1 -> 'T2 -> 'State -> 'State
    arg1 : ResizeArray<'T1>
    arg2 : ResizeArray<'T2>
    arg3 : 'State

Returns: 'State

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.

arg0 : 'T1 -> 'T2 -> 'State -> 'State
arg1 : ResizeArray<'T1>
arg2 : ResizeArray<'T2>
arg3 : 'State
Returns: 'State

ResizeArray.forall arg1 arg2

Full Usage: ResizeArray.forall arg1 arg2

Parameters:
    arg0 : 'T -> bool
    arg1 : ResizeArray<'T>

Returns: bool

Test if all elements of the array satisfy the given predicate. If the input function is f and the elements are i0...iN and "j0...jN" then computes p i0 && ... && p iN.

arg0 : 'T -> bool
arg1 : ResizeArray<'T>
Returns: bool

ResizeArray.forall2 arg1 arg2 arg3

Full Usage: ResizeArray.forall2 arg1 arg2 arg3

Parameters:
    arg0 : 'T1 -> 'T2 -> bool
    arg1 : ResizeArray<'T1>
    arg2 : ResizeArray<'T2>

Returns: 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.

arg0 : 'T1 -> 'T2 -> bool
arg1 : ResizeArray<'T1>
arg2 : ResizeArray<'T2>
Returns: bool

ResizeArray.get arg1 arg2

Full Usage: ResizeArray.get arg1 arg2

Parameters:
    arg0 : ResizeArray<'T>
    arg1 : int

Returns: 'T

Fetch an element from the collection. You can also use the syntax arr.[idx].

arg0 : ResizeArray<'T>
arg1 : int
Returns: 'T

ResizeArray.init arg1 arg2

Full Usage: ResizeArray.init arg1 arg2

Parameters:
    arg0 : int
    arg1 : int -> 'T

Returns: ResizeArray<'T>

Create an array by calling the given generator on each index.

arg0 : int
arg1 : int -> 'T
Returns: ResizeArray<'T>

ResizeArray.isEmpty arg1

Full Usage: ResizeArray.isEmpty arg1

Parameters:
    arg0 : ResizeArray<'T>

Returns: bool

Return true if the given array is empty, otherwise false

arg0 : ResizeArray<'T>
Returns: bool

ResizeArray.iter arg1 arg2

Full Usage: ResizeArray.iter arg1 arg2

Parameters:
    arg0 : 'T -> unit
    arg1 : ResizeArray<'T>

Apply the given function to each element of the array.

arg0 : 'T -> unit
arg1 : ResizeArray<'T>

ResizeArray.iter2 arg1 arg2 arg3

Full Usage: ResizeArray.iter2 arg1 arg2 arg3

Parameters:
    arg0 : 'T1 -> 'T2 -> unit
    arg1 : ResizeArray<'T1>
    arg2 : ResizeArray<'T2>

Apply the given function to two arrays simultaneously. The two arrays must have the same lengths, otherwise an Invalid_argument exception is raised.

arg0 : 'T1 -> 'T2 -> unit
arg1 : ResizeArray<'T1>
arg2 : ResizeArray<'T2>

ResizeArray.iteri arg1 arg2

Full Usage: ResizeArray.iteri arg1 arg2

Parameters:
    arg0 : int -> 'T -> unit
    arg1 : ResizeArray<'T>

Apply the given function to each element of the array. The integer passed to the function indicates the index of element.

arg0 : int -> 'T -> unit
arg1 : ResizeArray<'T>

ResizeArray.iteri2 arg1 arg2 arg3

Full Usage: ResizeArray.iteri2 arg1 arg2 arg3

Parameters:
    arg0 : int -> 'T1 -> 'T2 -> unit
    arg1 : ResizeArray<'T1>
    arg2 : ResizeArray<'T2>

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.

arg0 : int -> 'T1 -> 'T2 -> unit
arg1 : ResizeArray<'T1>
arg2 : ResizeArray<'T2>

ResizeArray.length arg1

Full Usage: ResizeArray.length arg1

Parameters:
    arg0 : ResizeArray<'T>

Returns: int

Return the length of the collection. You can also use property arr.Length.

arg0 : ResizeArray<'T>
Returns: int

ResizeArray.map arg1 arg2

Full Usage: ResizeArray.map arg1 arg2

Parameters:
    arg0 : 'T -> 'U
    arg1 : ResizeArray<'T>

Returns: ResizeArray<'U>

Build a new array whose elements are the results of applying the given function to each of the elements of the array.

arg0 : 'T -> 'U
arg1 : ResizeArray<'T>
Returns: ResizeArray<'U>

ResizeArray.map2 arg1 arg2 arg3

Full Usage: ResizeArray.map2 arg1 arg2 arg3

Parameters:
    arg0 : 'T1 -> 'T2 -> 'U
    arg1 : ResizeArray<'T1>
    arg2 : ResizeArray<'T2>

Returns: ResizeArray<'U>

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.

arg0 : 'T1 -> 'T2 -> 'U
arg1 : ResizeArray<'T1>
arg2 : ResizeArray<'T2>
Returns: ResizeArray<'U>

ResizeArray.mapi arg1 arg2

Full Usage: ResizeArray.mapi arg1 arg2

Parameters:
    arg0 : int -> 'T -> 'U
    arg1 : ResizeArray<'T>

Returns: ResizeArray<'U>

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.

arg0 : int -> 'T -> 'U
arg1 : ResizeArray<'T>
Returns: ResizeArray<'U>

ResizeArray.mapi2 arg1 arg2 arg3

Full Usage: ResizeArray.mapi2 arg1 arg2 arg3

Parameters:
    arg0 : int -> 'T1 -> 'T2 -> 'U
    arg1 : ResizeArray<'T1>
    arg2 : ResizeArray<'T2>

Returns: ResizeArray<'U>

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.

arg0 : int -> 'T1 -> 'T2 -> 'U
arg1 : ResizeArray<'T1>
arg2 : ResizeArray<'T2>
Returns: ResizeArray<'U>

ResizeArray.ofArray arg1

Full Usage: ResizeArray.ofArray arg1

Parameters:
    arg0 : 'T[]

Returns: ResizeArray<'T>

Build a ResizeArray from the given elements

arg0 : 'T[]
Returns: ResizeArray<'T>

ResizeArray.ofList arg1

Full Usage: ResizeArray.ofList arg1

Parameters:
    arg0 : 'T list

Returns: ResizeArray<'T>

Build an array from the given list

arg0 : 'T list
Returns: ResizeArray<'T>

ResizeArray.ofSeq arg1

Full Usage: ResizeArray.ofSeq arg1

Parameters:
    arg0 : seq<'T>

Returns: ResizeArray<'T>

Build and array from the given seq

arg0 : seq<'T>
Returns: ResizeArray<'T>

ResizeArray.partition arg1 arg2

Full Usage: ResizeArray.partition arg1 arg2

Parameters:
    arg0 : 'T -> bool
    arg1 : ResizeArray<'T>

Returns: ResizeArray<'T> * ResizeArray<'T>

Split the collection into two collections, containing the elements for which the given predicate returns true and false respectively

arg0 : 'T -> bool
arg1 : ResizeArray<'T>
Returns: ResizeArray<'T> * ResizeArray<'T>

ResizeArray.reduce arg1 arg2

Full Usage: ResizeArray.reduce arg1 arg2

Parameters:
    arg0 : 'T -> 'T -> 'T
    arg1 : ResizeArray<'T>

Returns: 'T

Apply a function to each element of the array, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f (... (f i0 i1)...) iN. Raises ArgumentException if the array has size zero.

arg0 : 'T -> 'T -> 'T
arg1 : ResizeArray<'T>
Returns: 'T

ResizeArray.reduceBack arg1 arg2

Full Usage: ResizeArray.reduceBack arg1 arg2

Parameters:
    arg0 : 'T -> 'T -> 'T
    arg1 : ResizeArray<'T>

Returns: 'T

Apply a function to each element of the array, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f i0 (...(f iN-1 iN)). Raises ArgumentException if the array has size zero.

arg0 : 'T -> 'T -> 'T
arg1 : ResizeArray<'T>
Returns: 'T

ResizeArray.rev arg1

Full Usage: ResizeArray.rev arg1

Parameters:
    arg0 : ResizeArray<'T>

Returns: ResizeArray<'T>

Return a new array with the elements in reverse order

arg0 : ResizeArray<'T>
Returns: ResizeArray<'T>

ResizeArray.scan arg1 arg2 arg3

Full Usage: ResizeArray.scan arg1 arg2 arg3

Parameters:
    arg0 : 'State -> 'T -> 'State
    arg1 : 'State
    arg2 : ResizeArray<'T>

Returns: ResizeArray<'State>

Like fold, but return the intermediary and final results

arg0 : 'State -> 'T -> 'State
arg1 : 'State
arg2 : ResizeArray<'T>
Returns: ResizeArray<'State>

ResizeArray.scanBack arg1 arg2 arg3

Full Usage: ResizeArray.scanBack arg1 arg2 arg3

Parameters:
    arg0 : 'T -> 'State -> 'State
    arg1 : ResizeArray<'T>
    arg2 : 'State

Returns: ResizeArray<'State>

Like foldBack, but return both the intermediary and final results

arg0 : 'T -> 'State -> 'State
arg1 : ResizeArray<'T>
arg2 : 'State
Returns: ResizeArray<'State>

ResizeArray.set arg1 arg2 arg3

Full Usage: ResizeArray.set arg1 arg2 arg3

Parameters:
    arg0 : ResizeArray<'T>
    arg1 : int
    arg2 : 'T

Set the value of an element in the collection. You can also use the syntax arr.[idx] <- e.

arg0 : ResizeArray<'T>
arg1 : int
arg2 : 'T

ResizeArray.singleton arg1

Full Usage: ResizeArray.singleton arg1

Parameters:
    arg0 : 'T

Returns: ResizeArray<'T>

Return an array containing the given element

arg0 : 'T
Returns: ResizeArray<'T>

ResizeArray.sort arg1 arg2

Full Usage: ResizeArray.sort arg1 arg2

Parameters:
    arg0 : 'T -> 'T -> int
    arg1 : ResizeArray<'T>

Sort the elements using the given comparison function

arg0 : 'T -> 'T -> int
arg1 : ResizeArray<'T>

ResizeArray.sortBy arg1 arg2

Full Usage: ResizeArray.sortBy arg1 arg2

Parameters:
    arg0 : 'T -> 'Key
    arg1 : ResizeArray<'T>

Sort the elements using the key extractor and generic comparison on the keys

arg0 : 'T -> 'Key
arg1 : ResizeArray<'T>

ResizeArray.sub arg1 arg2 arg3

Full Usage: ResizeArray.sub arg1 arg2 arg3

Parameters:
    arg0 : ResizeArray<'T>
    arg1 : int
    arg2 : int

Returns: ResizeArray<'T>

Build a new array that contains the given subrange specified by starting index and length.

arg0 : ResizeArray<'T>
arg1 : int
arg2 : int
Returns: ResizeArray<'T>

ResizeArray.toArray arg1

Full Usage: ResizeArray.toArray arg1

Parameters:
    arg0 : ResizeArray<'T>

Returns: 'T[]

Return a fixed-length array containing the elements of the input ResizeArray

arg0 : ResizeArray<'T>
Returns: 'T[]

ResizeArray.toList arg1

Full Usage: ResizeArray.toList arg1

Parameters:
    arg0 : ResizeArray<'T>

Returns: 'T list

Build a list from the given array

arg0 : ResizeArray<'T>
Returns: 'T list

ResizeArray.toSeq arg1

Full Usage: ResizeArray.toSeq arg1

Parameters:
    arg0 : ResizeArray<'T>

Returns: seq<'T>

Return a view of the array as an enumerable object

arg0 : ResizeArray<'T>
Returns: seq<'T>

ResizeArray.tryFind arg1 arg2

Full Usage: ResizeArray.tryFind arg1 arg2

Parameters:
    arg0 : 'T -> bool
    arg1 : ResizeArray<'T>

Returns: 'T option

Return the first element for which the given function returns true. Return None if no such element exists.

arg0 : 'T -> bool
arg1 : ResizeArray<'T>
Returns: 'T option

ResizeArray.tryFindIndex arg1 arg2

Full Usage: ResizeArray.tryFindIndex arg1 arg2

Parameters:
    arg0 : 'T -> bool
    arg1 : ResizeArray<'T>

Returns: int option

Return the index of the first element in the array that satisfies the given predicate.

arg0 : 'T -> bool
arg1 : ResizeArray<'T>
Returns: int option

ResizeArray.tryFindIndexi arg1 arg2

Full Usage: ResizeArray.tryFindIndexi arg1 arg2

Parameters:
    arg0 : int -> 'T -> bool
    arg1 : ResizeArray<'T>

Returns: int option

Return the index of the first element in the array that satisfies the given predicate.

arg0 : int -> 'T -> bool
arg1 : ResizeArray<'T>
Returns: int option

ResizeArray.tryPick arg1 arg2

Full Usage: ResizeArray.tryPick arg1 arg2

Parameters:
    arg0 : 'T -> 'U option
    arg1 : ResizeArray<'T>

Returns: 'U option

Apply the given function to successive elements, returning the first result where function returns "Some(x)" for some x.

arg0 : 'T -> 'U option
arg1 : ResizeArray<'T>
Returns: 'U option

ResizeArray.unzip arg1

Full Usage: ResizeArray.unzip arg1

Parameters:
    arg0 : ResizeArray<'T1 * 'T2>

Returns: ResizeArray<'T1> * ResizeArray<'T2>

Split an array of pairs into two arrays

arg0 : ResizeArray<'T1 * 'T2>
Returns: ResizeArray<'T1> * ResizeArray<'T2>

ResizeArray.zip arg1 arg2

Full Usage: ResizeArray.zip arg1 arg2

Parameters:
    arg0 : ResizeArray<'T1>
    arg1 : ResizeArray<'T2>

Returns: ResizeArray<'T1 * 'T2>

Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is raised..

arg0 : ResizeArray<'T1>
arg1 : ResizeArray<'T2>
Returns: ResizeArray<'T1 * 'T2>