fsprojects/FSharpx.Collections


DList<'T>

Namespace: FSharpx.Collections.Experimental

The DList is an implementation of John Hughes' append list. See http://dl.acm.org/citation.cfm?id=8475 for more information. This implementation adds an additional parameter to allow a more efficient calculation of the list length. Note that an alternate form would represent the DList as: type DList<'T> = DList of ('T list -> 'T list) An example can be found at http://stackoverflow.com/questions/5324623/functional-o1-append-and-on-iteration-from-first-element-list-data-structure/5327209#5327209

Union Cases

Union CaseDescription
Join(DList<'T>,DList<'T>,int)
Signature: DList<'T> * DList<'T> * int
Nil
Signature:
Unit('T)
Signature: 'T

Instance members

Instance memberDescription
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

snoc(a)
Signature: a:'T -> DList<'T>

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

Tail
Signature: DList<'T>

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

CompiledName: get_Tail

Static members

Static memberDescription
( [] )()
Signature: unit -> DList<'?11197>

CompiledName: op_Nil

( = )(left, right)
Signature: (left:DList<'?11194> * right:DList<'?11194>) -> bool

CompiledName: op_Equality

Fork me on GitHub