FSharpx.Collections


BinaryRandomAccessList Module

Functions and values

Function or value Description

BinaryRandomAccessList.cons x xs

Full Usage: BinaryRandomAccessList.cons x xs

Parameters:
Returns: BinaryRandomAccessList<'T>

O(log n), worst case. Returns a new random access list with the element added to the beginning.

x : 'T
xs : BinaryRandomAccessList<'T>
Returns: BinaryRandomAccessList<'T>

BinaryRandomAccessList.empty ()

Full Usage: BinaryRandomAccessList.empty ()

Parameters:
    () : unit

Returns: BinaryRandomAccessList<'T>

O(1). Returns a empty random access list.

() : unit
Returns: BinaryRandomAccessList<'T>

BinaryRandomAccessList.head xs

Full Usage: BinaryRandomAccessList.head xs

Parameters:
Returns: 'T

O(log n), worst case. Returns the first element.

xs : BinaryRandomAccessList<'T>
Returns: 'T

BinaryRandomAccessList.isEmpty xs

Full Usage: BinaryRandomAccessList.isEmpty xs

Parameters:
Returns: bool

O(1). Returns true if the random access list has no elements.

xs : BinaryRandomAccessList<'T>
Returns: bool

BinaryRandomAccessList.length xs

Full Usage: BinaryRandomAccessList.length xs

Parameters:
Returns: int

O(log n). Returns the count of elements.

xs : BinaryRandomAccessList<'T>
Returns: int

BinaryRandomAccessList.lookup i xs

Full Usage: BinaryRandomAccessList.lookup i xs

Parameters:
Returns: 'T

O(log n), worst case. Returns element by index.

i : int
xs : BinaryRandomAccessList<'T>
Returns: 'T

BinaryRandomAccessList.ofSeq s

Full Usage: BinaryRandomAccessList.ofSeq s

Parameters:
    s : seq<'a>

Returns: BinaryRandomAccessList<'a>

O(n). Returns random access list from the sequence.

s : seq<'a>
Returns: BinaryRandomAccessList<'a>

BinaryRandomAccessList.rev xs

Full Usage: BinaryRandomAccessList.rev xs

Parameters:
Returns: BinaryRandomAccessList<'T>

O(n). Returns random access list reversed.

xs : BinaryRandomAccessList<'T>
Returns: BinaryRandomAccessList<'T>

BinaryRandomAccessList.tail xs

Full Usage: BinaryRandomAccessList.tail xs

Parameters:
Returns: BinaryRandomAccessList<'T>

O(log n), worst case. Returns a new random access list of the elements trailing the first element.

xs : BinaryRandomAccessList<'T>
Returns: BinaryRandomAccessList<'T>

BinaryRandomAccessList.tryGetHead xs

Full Usage: BinaryRandomAccessList.tryGetHead xs

Parameters:
Returns: 'T option

O(log n), worst case. Returns option first element.

xs : BinaryRandomAccessList<'T>
Returns: 'T option

BinaryRandomAccessList.tryGetTail xs

Full Usage: BinaryRandomAccessList.tryGetTail xs

Parameters:
Returns: BinaryRandomAccessList<'T> option

O(log n), worst case. Returns a option random access list of the elements trailing the first element.

xs : BinaryRandomAccessList<'T>
Returns: BinaryRandomAccessList<'T> option

BinaryRandomAccessList.tryLookup i xs

Full Usage: BinaryRandomAccessList.tryLookup i xs

Parameters:
Returns: 'T option

O(log n), worst case. Returns option element by index.

i : int
xs : BinaryRandomAccessList<'T>
Returns: 'T option

BinaryRandomAccessList.tryUncons xs

Full Usage: BinaryRandomAccessList.tryUncons xs

Parameters:
Returns: ('T * BinaryRandomAccessList<'T>) option

O(log n), worst case. Returns the option first element and tail.

xs : BinaryRandomAccessList<'T>
Returns: ('T * BinaryRandomAccessList<'T>) option

BinaryRandomAccessList.tryUpdate i y xs

Full Usage: BinaryRandomAccessList.tryUpdate i y xs

Parameters:
Returns: BinaryRandomAccessList<'T> option

O(log n), worst case. Returns option random access list with element updated by index.

i : int
y : 'T
xs : BinaryRandomAccessList<'T>
Returns: BinaryRandomAccessList<'T> option

BinaryRandomAccessList.uncons xs

Full Usage: BinaryRandomAccessList.uncons xs

Parameters:
Returns: 'T * BinaryRandomAccessList<'T>

O(log n), worst case. Returns the first element and tail.

xs : BinaryRandomAccessList<'T>
Returns: 'T * BinaryRandomAccessList<'T>

BinaryRandomAccessList.update i y xs

Full Usage: BinaryRandomAccessList.update i y xs

Parameters:
Returns: BinaryRandomAccessList<'T>

O(log n), worst case. Returns random access list with element updated by index.

i : int
y : 'T
xs : BinaryRandomAccessList<'T>
Returns: BinaryRandomAccessList<'T>

Active patterns

Active pattern Description

BinaryRandomAccessList.(|Cons|Nil|) l

Full Usage: BinaryRandomAccessList.(|Cons|Nil|) l

Parameters:
Returns: Choice<('T * BinaryRandomAccessList<'T>), unit>
l : BinaryRandomAccessList<'T>
Returns: Choice<('T * BinaryRandomAccessList<'T>), unit>