Header menu logo fantomas

ResizeArray Module

Functions and values

Function or value Description

chunkBySize chunkSize f items

Full Usage: chunkBySize chunkSize f items

Parameters:
    chunkSize : int
    f : 't -> 'a
    items : ResizeArray<'t>

Returns: 'a[][]

Split a ResizeArray into an array of smaller chunks. This requires `items/chunkSize` Array copies of length `chunkSize` if `items/chunkSize % 0 = 0`, otherwise `items/chunkSize + 1` Array copies.

chunkSize : int
f : 't -> 'a
items : ResizeArray<'t>
Returns: 'a[][]

mapToSmallArrayChunks f inp

Full Usage: mapToSmallArrayChunks f inp

Parameters:
    f : 't -> 'a
    inp : ResizeArray<'t>

Returns: 'a[][]

Split a large ResizeArray into a series of array chunks that are each under the Large Object Heap limit. This is done to help prevent a stop-the-world collection of the single large array, instead allowing for a greater probability of smaller collections. Stop-the-world is still possible, just less likely.

f : 't -> 'a
inp : ResizeArray<'t>
Returns: 'a[][]

Type something to start searching.