FSharpx.Collections


DList Module

Functions and values

Function or value Description

DList.append arg1 arg2

Full Usage: DList.append arg1 arg2

Parameters:
Returns: DList<'T>

O(1). Returns a new DList of two lists.

arg0 : DList<'T>
arg1 : DList<'T>
Returns: DList<'T>

DList.conj arg1 arg2

Full Usage: DList.conj arg1 arg2

Parameters:
    arg0 : 'T
    arg1 : DList<'T>

Returns: DList<'T>

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

arg0 : 'T
arg1 : DList<'T>
Returns: DList<'T>

DList.cons arg1 arg2

Full Usage: DList.cons arg1 arg2

Parameters:
    arg0 : 'T
    arg1 : DList<'T>

Returns: DList<'T>

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

arg0 : 'T
arg1 : DList<'T>
Returns: DList<'T>

DList.empty

Full Usage: DList.empty

Returns: DList<'T>

O(1). Returns DList of no elements.

Returns: DList<'T>

DList.fold arg1 arg2 arg3

Full Usage: DList.fold arg1 arg2 arg3

Parameters:
    arg0 : 'State -> 'T -> 'State
    arg1 : 'State
    arg2 : DList<'T>

Returns: 'State
arg0 : 'State -> 'T -> 'State
arg1 : 'State
arg2 : DList<'T>
Returns: 'State

DList.foldBack arg1 arg2 arg3

Full Usage: DList.foldBack arg1 arg2 arg3

Parameters:
    arg0 : 'T -> 'State -> 'State
    arg1 : DList<'T>
    arg2 : 'State

Returns: 'State

O(n). Fold walks the DList using constant stack space. Implementation is from Norman Ramsey. See http://stackoverflow.com/questions/5324623/functional-o1-append-and-on-iteration-from-first-element-list-data-structure/5334068#5334068

arg0 : 'T -> 'State -> 'State
arg1 : DList<'T>
arg2 : 'State
Returns: 'State

DList.head arg1

Full Usage: DList.head arg1

Parameters:
Returns: 'T

O(log n). Returns the first element.

arg0 : DList<'T>
Returns: 'T

DList.isEmpty arg1

Full Usage: DList.isEmpty arg1

Parameters:
Returns: bool

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

arg0 : DList<'T>
Returns: bool

DList.length arg1

Full Usage: DList.length arg1

Parameters:
Returns: int

O(1). Returns the count of elememts.

arg0 : DList<'T>
Returns: int

DList.ofSeq arg1

Full Usage: DList.ofSeq arg1

Parameters:
    arg0 : seq<'T>

Returns: DList<'T>

O(n). Returns a DList of the seq.

arg0 : seq<'T>
Returns: DList<'T>

DList.pairwise arg1

Full Usage: DList.pairwise arg1

Parameters:
Returns: DList<'T * 'T>

O(n). Returns a pairwise DList of elements.

arg0 : DList<'T>
Returns: DList<'T * 'T>

DList.singleton arg1

Full Usage: DList.singleton arg1

Parameters:
    arg0 : 'T

Returns: DList<'T>

O(1). Returns DList of one elements.

arg0 : 'T
Returns: DList<'T>

DList.tail arg1

Full Usage: DList.tail arg1

Parameters:
Returns: DList<'T>

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

arg0 : DList<'T>
Returns: DList<'T>

DList.toList arg1

Full Usage: DList.toList arg1

Parameters:
Returns: 'T list

O(n). Returns a list of the DList elements.

arg0 : DList<'T>
Returns: 'T list

DList.toSeq arg1

Full Usage: DList.toSeq arg1

Parameters:
Returns: seq<'T>

O(n). Returns a seq of the DList elements.

arg0 : DList<'T>
Returns: seq<'T>

DList.tryHead arg1

Full Usage: DList.tryHead arg1

Parameters:
Returns: 'T option

O(log n). Returns option first element.

arg0 : DList<'T>
Returns: 'T option

DList.tryTail arg1

Full Usage: DList.tryTail arg1

Parameters:
Returns: DList<'T> option

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

arg0 : DList<'T>
Returns: DList<'T> option

DList.tryUncons arg1

Full Usage: DList.tryUncons arg1

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

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

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

DList.uncons arg1

Full Usage: DList.uncons arg1

Parameters:
Returns: 'T * DList<'T>

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

arg0 : DList<'T>
Returns: 'T * DList<'T>

Active patterns

Active pattern Description

DList.(|Cons|Nil|) arg1

Full Usage: DList.(|Cons|Nil|) arg1

Parameters:
Returns: Choice<('T * DList<'T>), unit>
arg0 : DList<'T>
Returns: Choice<('T * DList<'T>), unit>