FSharpx.Collections


BankersQueue<'T> Type

Constructors

Constructor Description

BankersQueue(frontLength, front, backLength, back)

Full Usage: BankersQueue(frontLength, front, backLength, back)

Parameters:
Returns: BankersQueue<'T>
frontLength : int
front : LazyList<'T>
backLength : int
back : LazyList<'T>
Returns: BankersQueue<'T>

Instance members

Instance member Description

this.Head

Full Usage: this.Head

Returns: 'T

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

Returns: 'T

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

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

Returns: bool

this.Length

Full Usage: this.Length

Returns: int

O(1). Returns the count of elements.

Returns: int

this.Rev

Full Usage: this.Rev

Returns: BankersQueue<'T>

O(1). Returns queue reversed

Returns: BankersQueue<'T>

this.Snoc(x)

Full Usage: this.Snoc(x)

Parameters:
    x : 'T

Returns: BankersQueue<'T>

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

x : 'T
Returns: BankersQueue<'T>

this.Tail

Full Usage: this.Tail

Returns: BankersQueue<'T>

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

Returns: BankersQueue<'T>

this.TryGetHead

Full Usage: this.TryGetHead

Returns: 'T option

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

Returns: 'T option

this.TryGetTail

Full Usage: this.TryGetTail

Returns: BankersQueue<'T> option

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

Returns: BankersQueue<'T> option

this.TryUncons

Full Usage: this.TryUncons

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

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

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

this.Uncons

Full Usage: this.Uncons

Returns: 'T * BankersQueue<'T>

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

Returns: 'T * BankersQueue<'T>