fsprojects/FSharpx.Collections


DList<'T>

Namespace: FSharpx.Collections

DList is an ordered linear structure implementing the List signature (head, tail, cons), end-insertion (conj), and O(1) append. Ordering is by insertion history. DList is an implementation of John Hughes' append list.

Instance members

Instance memberDescription
Conj(arg1)
Signature: 'T -> DList<'T>

O(1). Returns a new DList with the element added to the end.

Cons(arg1)
Signature: 'T -> DList<'T>

O(1). Returns a new DList with the element added to the front.

Head
Signature: 'T

O(log n). Returns the first element.

CompiledName: get_Head

IsEmpty
Signature: bool

O(1). Returns true if the DList has no elements.

CompiledName: get_IsEmpty

Length
Signature: int

O(1). Returns the count of elememts.

CompiledName: get_Length

Tail
Signature: DList<'T>

O(log n). Returns a new DList of the elements trailing the first element.

CompiledName: get_Tail

TryHead
Signature: 'T option

O(log n). Returns option first element

CompiledName: get_TryHead

TryTail
Signature: DList<'T> option

O(log n). Returns option DList of the elements trailing the first element.

CompiledName: get_TryTail

TryUncons
Signature: ('T * DList<'T>) option

O(log n). Returns option first element and tail.

CompiledName: get_TryUncons

Uncons
Signature: 'T * DList<'T>

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

CompiledName: get_Uncons

Fork me on GitHub