FSharpx.Collections


BatchedDeque Module

Functions and values

Function or value Description

BatchedDeque.cons x q

Full Usage: BatchedDeque.cons x q

Parameters:
Returns: BatchedDeque<'T>

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

x : 'T
q : BatchedDeque<'T>
Returns: BatchedDeque<'T>

BatchedDeque.empty ()

Full Usage: BatchedDeque.empty ()

Parameters:
    () : unit

Returns: BatchedDeque<'a>

O(1). Returns deque of no elements.

() : unit
Returns: BatchedDeque<'a>

BatchedDeque.head q

Full Usage: BatchedDeque.head q

Parameters:
Returns: 'T

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

q : BatchedDeque<'T>
Returns: 'T

BatchedDeque.init q

Full Usage: BatchedDeque.init q

Parameters:
Returns: BatchedDeque<'T>

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

q : BatchedDeque<'T>
Returns: BatchedDeque<'T>

BatchedDeque.isEmpty q

Full Usage: BatchedDeque.isEmpty q

Parameters:
Returns: bool

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

q : BatchedDeque<'T>
Returns: bool

BatchedDeque.last q

Full Usage: BatchedDeque.last q

Parameters:
Returns: 'T

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

q : BatchedDeque<'T>
Returns: 'T

BatchedDeque.length q

Full Usage: BatchedDeque.length q

Parameters:
Returns: int

O(1). Returns the count of elements.

q : BatchedDeque<'T>
Returns: int

BatchedDeque.lookup i q

Full Usage: BatchedDeque.lookup i q

Parameters:
Returns: 'T

O(n), worst case. Returns element by index.

i : int
q : BatchedDeque<'T>
Returns: 'T

BatchedDeque.ofCatLists xs ys

Full Usage: BatchedDeque.ofCatLists xs ys

Parameters:
    xs : 'a list
    ys : 'a list

Returns: BatchedDeque<'a>

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

xs : 'a list
ys : 'a list
Returns: BatchedDeque<'a>

BatchedDeque.ofList xs

Full Usage: BatchedDeque.ofList xs

Parameters:
    xs : 'a list

Returns: BatchedDeque<'a>

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

xs : 'a list
Returns: BatchedDeque<'a>

BatchedDeque.ofSeq xs

Full Usage: BatchedDeque.ofSeq xs

Parameters:
    xs : seq<'a>

Returns: BatchedDeque<'a>

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

xs : seq<'a>
Returns: BatchedDeque<'a>

BatchedDeque.remove i q

Full Usage: BatchedDeque.remove i q

Parameters:
Returns: BatchedDeque<'T>

O(n), worst case. Returns deque with element removed by index.

i : int
q : BatchedDeque<'T>
Returns: BatchedDeque<'T>

BatchedDeque.rev q

Full Usage: BatchedDeque.rev q

Parameters:
Returns: BatchedDeque<'T>

O(1). Returns deque reversed.

q : BatchedDeque<'T>
Returns: BatchedDeque<'T>

BatchedDeque.singleton x

Full Usage: BatchedDeque.singleton x

Parameters:
    x : 'a

Returns: BatchedDeque<'a>

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

x : 'a
Returns: BatchedDeque<'a>

BatchedDeque.snoc x q

Full Usage: BatchedDeque.snoc x q

Parameters:
Returns: BatchedDeque<'T>

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

x : 'T
q : BatchedDeque<'T>
Returns: BatchedDeque<'T>

BatchedDeque.tail q

Full Usage: BatchedDeque.tail q

Parameters:
Returns: BatchedDeque<'T>

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

q : BatchedDeque<'T>
Returns: BatchedDeque<'T>

BatchedDeque.tryGetHead q

Full Usage: BatchedDeque.tryGetHead q

Parameters:
Returns: 'T option

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

q : BatchedDeque<'T>
Returns: 'T option

BatchedDeque.tryGetInit q

Full Usage: BatchedDeque.tryGetInit q

Parameters:
Returns: BatchedDeque<'T> option

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

q : BatchedDeque<'T>
Returns: BatchedDeque<'T> option

BatchedDeque.tryGetLast q

Full Usage: BatchedDeque.tryGetLast q

Parameters:
Returns: 'T option

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

q : BatchedDeque<'T>
Returns: 'T option

BatchedDeque.tryGetTail q

Full Usage: BatchedDeque.tryGetTail q

Parameters:
Returns: BatchedDeque<'T> option

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

q : BatchedDeque<'T>
Returns: BatchedDeque<'T> option

BatchedDeque.tryLookup i q

Full Usage: BatchedDeque.tryLookup i q

Parameters:
Returns: 'T option

O(n), worst case. Returns option element by index.

i : int
q : BatchedDeque<'T>
Returns: 'T option

BatchedDeque.tryRemove i q

Full Usage: BatchedDeque.tryRemove i q

Parameters:
Returns: BatchedDeque<'T> option

O(n), worst case. Returns option deque with element removed by index.

i : int
q : BatchedDeque<'T>
Returns: BatchedDeque<'T> option

BatchedDeque.tryUncons q

Full Usage: BatchedDeque.tryUncons q

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

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

q : BatchedDeque<'T>
Returns: ('T * BatchedDeque<'T>) option

BatchedDeque.tryUnsnoc q

Full Usage: BatchedDeque.tryUnsnoc q

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

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

q : BatchedDeque<'T>
Returns: (BatchedDeque<'T> * 'T) option

BatchedDeque.tryUpdate i y q

Full Usage: BatchedDeque.tryUpdate i y q

Parameters:
Returns: BatchedDeque<'T> option

O(n), worst case. Returns option deque with element updated by index.

i : int
y : 'T
q : BatchedDeque<'T>
Returns: BatchedDeque<'T> option

BatchedDeque.uncons q

Full Usage: BatchedDeque.uncons q

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

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

q : BatchedDeque<'T>
Returns: 'T * BatchedDeque<'T>

BatchedDeque.unsnoc q

Full Usage: BatchedDeque.unsnoc q

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

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

q : BatchedDeque<'T>
Returns: BatchedDeque<'T> * 'T

BatchedDeque.update i y q

Full Usage: BatchedDeque.update i y q

Parameters:
Returns: BatchedDeque<'T>

O(n), worst case. Returns deque with element updated by index.

i : int
y : 'T
q : BatchedDeque<'T>
Returns: BatchedDeque<'T>

Active patterns

Active pattern Description

BatchedDeque.(|Cons|Nil|) q

Full Usage: BatchedDeque.(|Cons|Nil|) q

Parameters:
Returns: Choice<('T * BatchedDeque<'T>), unit>
q : BatchedDeque<'T>
Returns: Choice<('T * BatchedDeque<'T>), unit>

BatchedDeque.(|Snoc|Nil|) q

Full Usage: BatchedDeque.(|Snoc|Nil|) q

Parameters:
Returns: Choice<(BatchedDeque<'T> * 'T), unit>
q : BatchedDeque<'T>
Returns: Choice<(BatchedDeque<'T> * 'T), unit>