Yaaf.FSharp.Helper


DList<'T>

Defined in Yaaf.FSharp.Helper.dll.

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](http://dl.acm.org/citation.cfm?id=8475).

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.

IsEmpty
Signature: bool

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

Length
Signature: int

O(1). Returns the count of elememts.

Tail
Signature: DList<'T>

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

TryHead
Signature: 'T option

O(log n). Returns option first element

TryTail
Signature: DList<'T> option

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

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

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

Uncons
Signature: 'T * DList<'T>

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

Fork me on GitHub