Header menu logo ResizeArray

Array Module

This module has only one conversion function. Array.asResizeArray

Functions and values

Function or value Description

asResizeArray arr

Full Usage: asResizeArray arr

Parameters:
    arr : 'T[] - The input Array.

Returns: ResizeArray<'T> A ResizeArray containing the same elements.
Modifiers: inline
Type parameters: 'T

an optimized alternative to the

toResizeArray
function for use in Fable (JavaScript). F# Array and ResizeArray are both represented as JavaScript arrays in Fable. So this function does not allocate a new ResizeArray but just casts the Array to a ResizeArray. In .NET runtime a new ResizeArray is still allocated and the elements are copied.

Numeric arrays are optimized as TypedArrays in Fable, so this function only works on reference types.

arr : 'T[]

The input Array.

Returns: ResizeArray<'T>

A ResizeArray containing the same elements.

Type something to start searching.