Header menu logo fantomas

Array Module

Functions and values

Function or value Description

areEqual xs ys

Full Usage: areEqual xs ys

Parameters:
    xs : 'T[]
    ys : 'T[]

Returns: bool
Modifiers: inline
Type parameters: 'T

Optimized arrays equality. ~100x faster than `array1 = array2` on strings. ~2x faster for floats ~0.8x slower for ints

xs : 'T[]
ys : 'T[]
Returns: bool

endsWith suffix whole

Full Usage: endsWith suffix whole

Parameters:
    suffix : 'a[]
    whole : 'a[]

Returns: bool

Returns true if one array has trailing elements equal to another's.

suffix : 'a[]
whole : 'a[]
Returns: bool

existsOne p l

Full Usage: existsOne p l

Parameters:
    p : 'a -> bool
    l : 'a[]

Returns: bool
p : 'a -> bool
l : 'a[]
Returns: bool

existsTrue arr

Full Usage: existsTrue arr

Parameters:
    arr : bool[]

Returns: bool
arr : bool[]
Returns: bool

findFirstIndexWhereTrue arr p

Full Usage: findFirstIndexWhereTrue arr p

Parameters:
    arr : 'a[]
    p : 'a -> bool

Returns: int
arr : 'a[]
p : 'a -> bool
Returns: int

heads array

Full Usage: heads array

Parameters:
    array : 'T[]

Returns: 'T[][]

Returns all heads of a given array.

array : 'T[]
Returns: 'T[][]

isSubArray subArray wholeArray index

Full Usage: isSubArray subArray wholeArray index

Parameters:
    subArray : 'T[]
    wholeArray : 'T[]
    index : int

Returns: bool
Modifiers: inline
Type parameters: 'T

Check if subArray is found in the wholeArray starting at the provided index

subArray : 'T[]
wholeArray : 'T[]
index : int
Returns: bool

lengthsEqAndForall2 p l1 l2

Full Usage: lengthsEqAndForall2 p l1 l2

Parameters:
    p : 'a -> 'b -> bool
    l1 : 'a[]
    l2 : 'b[]

Returns: bool
p : 'a -> 'b -> bool
l1 : 'a[]
l2 : 'b[]
Returns: bool

mapAsync mapping array

Full Usage: mapAsync mapping array

Parameters:
    mapping : 'T -> Async<'U>
    array : 'T[]

Returns: Async<'U[]>

Async implementation of Array.map.

mapping : 'T -> Async<'U>
array : 'T[]
Returns: Async<'U[]>

mapq f inp

Full Usage: mapq f inp

Parameters:
    f : 'a -> 'a
    inp : 'a[]

Returns: 'a[]
f : 'a -> 'a
inp : 'a[]
Returns: 'a[]

order eltOrder

Full Usage: order eltOrder

Parameters:
Returns: IComparer<'T array>
eltOrder : IComparer<'T>
Returns: IComparer<'T array>

prepend item array

Full Usage: prepend item array

Parameters:
    item : 'T
    array : 'T[]

Returns: 'T[]
item : 'T
array : 'T[]
Returns: 'T[]

replace index value array

Full Usage: replace index value array

Parameters:
    index : int
    value : 'a
    array : 'a[]

Returns: 'a[]

Returns a new array with an element replaced with a given value.

index : int
value : 'a
array : 'a[]
Returns: 'a[]

revInPlace array

Full Usage: revInPlace array

Parameters:
    array : 'T[]

pass an array byref to reverse it in place

array : 'T[]

startsWith prefix whole

Full Usage: startsWith prefix whole

Parameters:
    prefix : 'a[]
    whole : 'a[]

Returns: bool

Returns true if one array has another as its subset from index 0.

prefix : 'a[]
whole : 'a[]
Returns: bool

Type something to start searching.