FSharpx.Collections


BankersQueue Module

Functions and values

Function or value Description

BankersQueue.empty ()

Full Usage: BankersQueue.empty ()

Parameters:
    () : unit

Returns: BankersQueue<'a>

O(1). Returns queue of no elements.

() : unit
Returns: BankersQueue<'a>

BankersQueue.head q

Full Usage: BankersQueue.head q

Parameters:
Returns: 'T

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

q : BankersQueue<'T>
Returns: 'T

BankersQueue.isEmpty () q

Full Usage: BankersQueue.isEmpty () q

Parameters:
Returns: bool

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

() : unit
q : BankersQueue<'T>
Returns: bool

BankersQueue.length () q

Full Usage: BankersQueue.length () q

Parameters:
Returns: int

O(1). Returns the count of elements.

() : unit
q : BankersQueue<'T>
Returns: int

BankersQueue.ofSeq xs

Full Usage: BankersQueue.ofSeq xs

Parameters:
    xs : seq<'a>

Returns: BankersQueue<'a>

O(1). Returns a queue of the seq.

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

BankersQueue.rev q

Full Usage: BankersQueue.rev q

Parameters:
Returns: BankersQueue<'T>

O(1). Returns queue reversed.

q : BankersQueue<'T>
Returns: BankersQueue<'T>

BankersQueue.snoc x q

Full Usage: BankersQueue.snoc x q

Parameters:
Returns: BankersQueue<'T>

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

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

BankersQueue.tail q

Full Usage: BankersQueue.tail q

Parameters:
Returns: BankersQueue<'T>

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

q : BankersQueue<'T>
Returns: BankersQueue<'T>

BankersQueue.tryGetHead q

Full Usage: BankersQueue.tryGetHead q

Parameters:
Returns: 'T option

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

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

BankersQueue.tryGetTail q

Full Usage: BankersQueue.tryGetTail q

Parameters:
Returns: BankersQueue<'T> option

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

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

BankersQueue.tryUncons q

Full Usage: BankersQueue.tryUncons q

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

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

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

BankersQueue.uncons q

Full Usage: BankersQueue.uncons q

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

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

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

Active patterns

Active pattern Description

BankersQueue.(|Cons|Nil|) q

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

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