FSharpx.Collections


DList<'T> Type

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 member Description

this.Conj(arg1)

Full Usage: this.Conj(arg1)

Parameters:
    arg0 : 'T

Returns: DList<'T>

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

arg0 : 'T
Returns: DList<'T>

this.Cons(arg1)

Full Usage: this.Cons(arg1)

Parameters:
    arg0 : 'T

Returns: DList<'T>

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

arg0 : 'T
Returns: DList<'T>

this.Head

Full Usage: this.Head

Returns: 'T

O(log n). Returns the first element.

Returns: 'T

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

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

Returns: bool

this.Length

Full Usage: this.Length

Returns: int

O(1). Returns the count of elememts.

Returns: int

this.Tail

Full Usage: this.Tail

Returns: DList<'T>

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

Returns: DList<'T>

this.TryHead

Full Usage: this.TryHead

Returns: 'T option

O(log n). Returns option first element

Returns: 'T option

this.TryTail

Full Usage: this.TryTail

Returns: DList<'T> option

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

Returns: DList<'T> option

this.TryUncons

Full Usage: this.TryUncons

Returns: ('T * DList<'T>) option

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

Returns: ('T * DList<'T>) option

this.Uncons

Full Usage: this.Uncons

Returns: 'T * DList<'T>

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

Returns: 'T * DList<'T>