FSharpx.Collections


BankersDeque Module

Functions and values

Function or value Description

BankersDeque.append xs ys

Full Usage: BankersDeque.append xs ys

Parameters:
Returns: BankersDeque<'T>

O(ys-xs). Returns a deque of the two deques concatenated, front-back stream ratio constant defaulted to 2.

xs : BankersDeque<'T>
ys : BankersDeque<'T>
Returns: BankersDeque<'T>

BankersDeque.appendC c xs ys

Full Usage: BankersDeque.appendC c xs ys

Parameters:
Returns: BankersDeque<'T>

O(ys-xs). Returns a deque of the two deques concatenated, c is front-back stream ratio constant, should be at least 2.

c : int
xs : BankersDeque<'T>
ys : BankersDeque<'T>
Returns: BankersDeque<'T>

BankersDeque.cons x q

Full Usage: BankersDeque.cons x q

Parameters:
Returns: BankersDeque<'T>

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

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

BankersDeque.empty c

Full Usage: BankersDeque.empty c

Parameters:
    c : int

Returns: BankersDeque<'a>

O(1). Returns deque of no elements, c is front-back stream ration constant, should be at least 2.

c : int
Returns: BankersDeque<'a>

BankersDeque.head q

Full Usage: BankersDeque.head q

Parameters:
Returns: 'T

O(1), amortized. Returns the first element.

q : BankersDeque<'T>
Returns: 'T

BankersDeque.init q

Full Usage: BankersDeque.init q

Parameters:
Returns: BankersDeque<'T>

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

q : BankersDeque<'T>
Returns: BankersDeque<'T>

BankersDeque.isEmpty q

Full Usage: BankersDeque.isEmpty q

Parameters:
Returns: bool

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

q : BankersDeque<'T>
Returns: bool

BankersDeque.last q

Full Usage: BankersDeque.last q

Parameters:
Returns: 'T

O(1), amortized. Returns the last element.

q : BankersDeque<'T>
Returns: 'T

BankersDeque.length q

Full Usage: BankersDeque.length q

Parameters:
Returns: int

O(1). Returns the count of elements.

q : BankersDeque<'T>
Returns: int

BankersDeque.lookup i q

Full Usage: BankersDeque.lookup i q

Parameters:
Returns: 'T

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

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

BankersDeque.ofCatLists xs ys

Full Usage: BankersDeque.ofCatLists xs ys

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

Returns: BankersDeque<'a>

O(ys-xs). Returns a deque of the two lists concatenated, front-back stream ratio constant defaulted to 2.

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

BankersDeque.ofCatListsC c xs ys

Full Usage: BankersDeque.ofCatListsC c xs ys

Parameters:
    c : int
    xs : 'a list
    ys : 'a list

Returns: BankersDeque<'a>

O(ys-xs). Returns a deque of the two lists concatenated, c is front-back stream ration constant, should be at least 2.

c : int
xs : 'a list
ys : 'a list
Returns: BankersDeque<'a>

BankersDeque.ofCatSeqs xs ys

Full Usage: BankersDeque.ofCatSeqs xs ys

Parameters:
    xs : seq<'a>
    ys : seq<'a>

Returns: BankersDeque<'a>

O(ys). Returns a deque of the two seqs concatenated, front-back stream ratio constant defaulted to 2.

xs : seq<'a>
ys : seq<'a>
Returns: BankersDeque<'a>

BankersDeque.ofCatSeqsC c xs ys

Full Usage: BankersDeque.ofCatSeqsC c xs ys

Parameters:
    c : int
    xs : seq<'a>
    ys : seq<'a>

Returns: BankersDeque<'a>

O(ys). Returns a deque of the two seqs concatenated, c is front-back stream ratio constant, should be at least 2.

c : int
xs : seq<'a>
ys : seq<'a>
Returns: BankersDeque<'a>

BankersDeque.ofSeq xs

Full Usage: BankersDeque.ofSeq xs

Parameters:
    xs : seq<'a>

Returns: BankersDeque<'a>

O(1). Returns a deque of the seq, front-back stream ratio constant defaulted to 2.

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

BankersDeque.ofSeqC c xs

Full Usage: BankersDeque.ofSeqC c xs

Parameters:
    c : int
    xs : seq<'a>

Returns: BankersDeque<'a>

O(1). Returns a deque of the seq, c is front-back stream ratio constant, should be at least 2.

c : int
xs : seq<'a>
Returns: BankersDeque<'a>

BankersDeque.remove i q

Full Usage: BankersDeque.remove i q

Parameters:
Returns: BankersDeque<'T>

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

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

BankersDeque.rev q

Full Usage: BankersDeque.rev q

Parameters:
Returns: BankersDeque<'T>

O(1). Returns deque reversed.

q : BankersDeque<'T>
Returns: BankersDeque<'T>

BankersDeque.singleton x

Full Usage: BankersDeque.singleton x

Parameters:
    x : 'a

Returns: BankersDeque<'a>

O(1). Returns a deque of one element, front-back stream ratio constant defaulted to 2.

x : 'a
Returns: BankersDeque<'a>

BankersDeque.singletonC c x

Full Usage: BankersDeque.singletonC c x

Parameters:
    c : int
    x : 'a

Returns: BankersDeque<'a>

O(1). Returns a deque of one element, c is front-back stream ratio constant, should be at least 2.

c : int
x : 'a
Returns: BankersDeque<'a>

BankersDeque.snoc x q

Full Usage: BankersDeque.snoc x q

Parameters:
Returns: BankersDeque<'T>

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

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

BankersDeque.tail q

Full Usage: BankersDeque.tail q

Parameters:
Returns: BankersDeque<'T>

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

q : BankersDeque<'T>
Returns: BankersDeque<'T>

BankersDeque.tryGetHead q

Full Usage: BankersDeque.tryGetHead q

Parameters:
Returns: 'T option

O(1), amortized. Returns option first element.

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

BankersDeque.tryGetInit q

Full Usage: BankersDeque.tryGetInit q

Parameters:
Returns: BankersDeque<'T> option

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

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

BankersDeque.tryGetLast q

Full Usage: BankersDeque.tryGetLast q

Parameters:
Returns: 'T option

O(1), amortized. Returns option last element.

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

BankersDeque.tryGetTail q

Full Usage: BankersDeque.tryGetTail q

Parameters:
Returns: BankersDeque<'T> option

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

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

BankersDeque.tryLookup i q

Full Usage: BankersDeque.tryLookup i q

Parameters:
Returns: 'T option

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

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

BankersDeque.tryRemove i q

Full Usage: BankersDeque.tryRemove i q

Parameters:
Returns: BankersDeque<'T> option

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

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

BankersDeque.tryUncons q

Full Usage: BankersDeque.tryUncons q

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

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

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

BankersDeque.tryUnsnoc q

Full Usage: BankersDeque.tryUnsnoc q

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

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

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

BankersDeque.tryUpdate i y q

Full Usage: BankersDeque.tryUpdate i y q

Parameters:
Returns: BankersDeque<'T> option

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

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

BankersDeque.uncons q

Full Usage: BankersDeque.uncons q

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

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

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

BankersDeque.unsnoc q

Full Usage: BankersDeque.unsnoc q

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

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

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

BankersDeque.update i y q

Full Usage: BankersDeque.update i y q

Parameters:
Returns: BankersDeque<'T>

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

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

Active patterns

Active pattern Description

BankersDeque.(|Cons|Nil|) q

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

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

BankersDeque.(|Snoc|Nil|) q

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

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