fsprojects/FSharpx.Collections


SkewBinaryRandomAccessList

Namespace: FSharpx.Collections.Experimental

Functions and values

Function or valueDescription
cons x xs
Signature: x:'T -> xs:SkewBinaryRandomAccessList<'T> -> SkewBinaryRandomAccessList<'T>
Type parameters: 'T

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

empty ()
Signature: unit -> SkewBinaryRandomAccessList<'T>
Type parameters: 'T

returns a empty random access list.

head xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> 'T
Type parameters: 'T

O(1), worst case. Returns the first element.

isEmpty xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> bool
Type parameters: 'T

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

length xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> int
Type parameters: 'T

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

lookup i xs
Signature: i:int -> xs:SkewBinaryRandomAccessList<'T> -> 'T
Type parameters: 'T

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

ofSeq s
Signature: s:seq<'?12433> -> SkewBinaryRandomAccessList<'?12433>
Type parameters: '?12433

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

rev xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> SkewBinaryRandomAccessList<'T>
Type parameters: 'T

O(n). Returns random access list reversed.

tail xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> SkewBinaryRandomAccessList<'T>
Type parameters: 'T

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

tryGetHead xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> 'T option
Type parameters: 'T

O(1), worst case. Returns option first element.

tryGetTail xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> SkewBinaryRandomAccessList<'T> option
Type parameters: 'T

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

tryLookup i xs
Signature: i:int -> xs:SkewBinaryRandomAccessList<'T> -> 'T option
Type parameters: 'T

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

tryUncons xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> ('T * SkewBinaryRandomAccessList<'T>) option
Type parameters: 'T

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

tryUpdate i y xs
Signature: i:int -> y:'T -> xs:SkewBinaryRandomAccessList<'T> -> SkewBinaryRandomAccessList<'T> option
Type parameters: 'T

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

uncons xs
Signature: xs:SkewBinaryRandomAccessList<'T> -> 'T * SkewBinaryRandomAccessList<'T>
Type parameters: 'T

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

update i y xs
Signature: i:int -> y:'T -> xs:SkewBinaryRandomAccessList<'T> -> SkewBinaryRandomAccessList<'T>
Type parameters: 'T

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

Active patterns

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

CompiledName: |Cons|Nil|

Fork me on GitHub