FSharpx.Collections


Deque Module

Functions and values

Function or value Description

Deque.conj arg1 arg2

Full Usage: Deque.conj arg1 arg2

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

Returns: Deque<'T>

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

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

Deque.cons arg1 arg2

Full Usage: Deque.cons arg1 arg2

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

Returns: Deque<'T>

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

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

Deque.empty

Full Usage: Deque.empty

Returns: Deque<'T>

O(1). Returns deque of no elements.

Returns: Deque<'T>

Deque.fold arg1 arg2 arg3

Full Usage: Deque.fold arg1 arg2 arg3

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

Returns: 'State

O(n). Applies a function to each element of the deque, threading an accumulator argument through the computation, left to right

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

Deque.foldBack arg1 arg2 arg3

Full Usage: Deque.foldBack arg1 arg2 arg3

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

Returns: 'State

O(n). Applies a function to each element of the deque, threading an accumulator argument through the computation, right to left

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

Deque.head arg1

Full Usage: Deque.head arg1

Parameters:
Returns: 'T

O(1) amortized, O(n), worst case. Returns the first element.

arg0 : Deque<'T>
Returns: 'T

Deque.initial arg1

Full Usage: Deque.initial arg1

Parameters:
Returns: Deque<'T>

O(1) amortized, O(n), worst case. Returns a new deque of the elements before the last element.

arg0 : Deque<'T>
Returns: Deque<'T>

Deque.isEmpty arg1

Full Usage: Deque.isEmpty arg1

Parameters:
Returns: bool

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

arg0 : Deque<'T>
Returns: bool

Deque.last arg1

Full Usage: Deque.last arg1

Parameters:
Returns: 'T

O(1) amortized, O(n), worst case. Returns the last element.

arg0 : Deque<'T>
Returns: 'T

Deque.length arg1

Full Usage: Deque.length arg1

Parameters:
Returns: int

O(1). Returns the count of elememts.

arg0 : Deque<'T>
Returns: int

Deque.ofCatLists arg1 arg2

Full Usage: Deque.ofCatLists arg1 arg2

Parameters:
    arg0 : 'T list
    arg1 : 'T list

Returns: Deque<'T>

O(n), worst case. Returns a deque of the two lists concatenated.

arg0 : 'T list
arg1 : 'T list
Returns: Deque<'T>

Deque.ofList arg1

Full Usage: Deque.ofList arg1

Parameters:
    arg0 : 'T list

Returns: Deque<'T>

O(n), worst case. Returns a deque of the list.

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

Deque.ofSeq arg1

Full Usage: Deque.ofSeq arg1

Parameters:
    arg0 : seq<'T>

Returns: Deque<'T>

O(n), worst case. Returns a deque of the seq.

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

Deque.rev arg1

Full Usage: Deque.rev arg1

Parameters:
Returns: Deque<'T>

O(1). Returns deque reversed.

arg0 : Deque<'T>
Returns: Deque<'T>

Deque.singleton arg1

Full Usage: Deque.singleton arg1

Parameters:
    arg0 : 'T

Returns: Deque<'T>

O(1). Returns a deque of one element.

arg0 : 'T
Returns: Deque<'T>

Deque.tail arg1

Full Usage: Deque.tail arg1

Parameters:
Returns: Deque<'T>

O(1) amortized, O(n), worst case. Returns a new deque of the elements trailing the first element.

arg0 : Deque<'T>
Returns: Deque<'T>

Deque.toSeq arg1

Full Usage: Deque.toSeq arg1

Parameters:
Returns: seq<'T>

O(n). Views the given deque as a sequence.

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

Deque.tryHead arg1

Full Usage: Deque.tryHead arg1

Parameters:
Returns: 'T option

O(1) amortized, O(n), worst case. Returns option first element.

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

Deque.tryInitial arg1

Full Usage: Deque.tryInitial arg1

Parameters:
Returns: Deque<'T> option

O(1) amortized, O(n), worst case. Returns option deque of the elements before the last element.

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

Deque.tryLast arg1

Full Usage: Deque.tryLast arg1

Parameters:
Returns: 'T option

O(1) amortized, O(n), worst case. Returns option last element.

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

Deque.tryTail arg1

Full Usage: Deque.tryTail arg1

Parameters:
Returns: Deque<'T> option

O(1) amortized, O(n), worst case. Returns option deque of the elements trailing the first element.

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

Deque.tryUnconj arg1

Full Usage: Deque.tryUnconj arg1

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

O(1) amortized, O(n), worst case. Returns option init and the last element.

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

Deque.tryUncons arg1

Full Usage: Deque.tryUncons arg1

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

O(1) amortized, O(n), worst case. Returns option first element and tail.

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

Deque.unconj arg1

Full Usage: Deque.unconj arg1

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

O(1) amortized, O(n), worst case. Returns init and the last element.

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

Deque.uncons arg1

Full Usage: Deque.uncons arg1

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

O(1) amortized, O(n), worst case. Returns the first element and tail.

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

Active patterns

Active pattern Description

Deque.(|Conj|Nil|) arg1

Full Usage: Deque.(|Conj|Nil|) arg1

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

Deque.(|Cons|Nil|) arg1

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

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