fsprojects/FSharpx.Collections


RandomAccessList

Namespace: FSharpx.Collections

Defines functions which allow to access and manipulate RandomAccessLists.

Functions and values

Function or valueDescription
append arg1 arg2
Signature: RandomAccessList<'T> -> RandomAccessList<'T> -> RandomAccessList<'T>
Type parameters: 'T

O(n). Returns a new random access list with the elements of the second random access list added at the end.

cons arg1 arg2
Signature: 'T -> RandomAccessList<'T> -> RandomAccessList<'T>
Type parameters: 'T

O(1). Returns a new random access list with the element added at the start.

empty
Signature: RandomAccessList<'T>
Type parameters: 'T

O(1). Returns random access list of no elements.

fold arg1 arg2 arg3
Signature: ('State -> 'T -> 'State) -> 'State -> RandomAccessList<'T> -> 'State
Type parameters: 'State, 'T

O(n). Returns a state from the supplied state and a function operating from left to right.

foldBack arg1 arg2 arg3
Signature: ('T -> 'State -> 'State) -> RandomAccessList<'T> -> 'State -> 'State
Type parameters: 'T, 'State

O(n). Returns a state from the supplied state and a function operating from right to left.

head arg1
Signature: RandomAccessList<'T> -> 'T
Type parameters: 'T

O(1). Returns the first element in the random access list. If the random access list is empty it throws an exception.

init arg1 arg2
Signature: int -> (int -> 'T) -> RandomAccessList<'T>
Type parameters: 'T

O(n). Returns a random access list of the supplied length using the supplied function operating on the index.

isEmpty arg1
Signature: RandomAccessList<'T> -> bool
Type parameters: 'T

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

length arg1
Signature: RandomAccessList<'T> -> int
Type parameters: 'T

O(1). Returns the number of items in the random access list.

map arg1 arg2
Signature: ('T -> 'T1) -> RandomAccessList<'T> -> RandomAccessList<'T1>
Type parameters: 'T, 'T1

O(n). Returns a random access list whose elements are the results of applying the supplied function to each of the elements of a supplied random access list.

nth arg1 arg2
Signature: int -> RandomAccessList<'T> -> 'T
Type parameters: 'T

O(1) for all practical purposes; really O(log32n). Returns the value at the index.

nthNth arg1 arg2 arg3
Signature: int -> int -> RandomAccessList<RandomAccessList<'T>> -> 'T
Type parameters: 'T

O(log32(m,n)). Returns the value at the outer index, inner index. If either index is out of bounds it throws an exception.

ofSeq arg1
Signature: seq<'T> -> RandomAccessList<'T>
Type parameters: 'T

O(n). Returns a random access list of the seq.

rev arg1
Signature: RandomAccessList<'T> -> RandomAccessList<'T>
Type parameters: 'T

O(n). Returns new random access list reversed.

singleton arg1
Signature: 'T -> RandomAccessList<'T>
Type parameters: 'T

O(1). Returns a new random access list of one element.

tail arg1
Signature: RandomAccessList<'T> -> RandomAccessList<'T>
Type parameters: 'T

O(1) for all practical purposes; really O(log32n). Returns a new random access list without the first item. If the collection is empty it throws an exception.

toSeq arg1
Signature: RandomAccessList<'T> -> seq<'T>
Type parameters: 'T

O(n). Views the given random access list as a sequence.

tryHead arg1
Signature: RandomAccessList<'T> -> 'T option
Type parameters: 'T

O(1). Returns option first element in the random access list.

tryNth arg1 arg2
Signature: int -> RandomAccessList<'T> -> 'T option
Type parameters: 'T

O(1) for all practical purposes; really O(log32n). Returns option value at the index.

tryNthNth arg1 arg2 arg3
Signature: int -> int -> RandomAccessList<RandomAccessList<'T>> -> 'T option
Type parameters: 'T

O(log32(m,n)). Returns option value at the indices.

tryTail arg1
Signature: RandomAccessList<'T> -> RandomAccessList<'T> option
Type parameters: 'T

O(1) for all practical purposes; really O(log32n). Returns option random access list without the first item.

tryUncons arg1
Signature: RandomAccessList<'T> -> ('T * RandomAccessList<'T>) option
Type parameters: 'T

O(1) for all practical purposes; really O(log32n). Returns option tuple first element and random access list without first item

tryUpdate arg1 arg2 arg3
Signature: int -> 'T -> RandomAccessList<'T> -> RandomAccessList<'T> option
Type parameters: 'T

O(1) for all practical purposes; really O(log32n). Returns option random access list that contains the given value at the index.

tryUpdateNth arg1 arg2 arg3 arg4
Signature: int -> int -> 'T -> RandomAccessList<RandomAccessList<'T>> -> RandomAccessList<RandomAccessList<'T>> option
Type parameters: 'T

O(log32(m,n)). Returns option random access list that contains the given value at the indices.

uncons arg1
Signature: RandomAccessList<'T> -> 'T * RandomAccessList<'T>
Type parameters: 'T

O(1) for all practical purposes; really O(log32n). Returns tuple first element and random access list without first item

update arg1 arg2 arg3
Signature: int -> 'T -> RandomAccessList<'T> -> RandomAccessList<'T>
Type parameters: 'T

O(1) for all practical purposes; really O(log32n). Returns a new random access list that contains the given value at the index.

updateNth arg1 arg2 arg3 arg4
Signature: int -> int -> 'T -> RandomAccessList<RandomAccessList<'T>> -> RandomAccessList<RandomAccessList<'T>>
Type parameters: 'T

O(log32(m,n)). Returns a new random access list of random access lists that contains the given value at the indices.

windowSeq arg1 arg2
Signature: int -> seq<'T> -> RandomAccessList<RandomAccessList<'T>>
Type parameters: 'T

O(n). Returns a random access list of random access lists of given length from the seq. Result may be a jagged random access list.

Active patterns

Active patternDescription
( |Cons|Nil| ) arg1
Signature: RandomAccessList<'T> -> Choice<('T * RandomAccessList<'T>),unit>
Type parameters: 'T

CompiledName: |Cons|Nil|

Fork me on GitHub