FSharpx.Collections


Queue Module

Functions and values

Function or value Description

Queue.conj arg1 arg2

Full Usage: Queue.conj arg1 arg2

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

Returns: Queue<'T>

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

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

Queue.empty

Full Usage: Queue.empty

Returns: Queue<'T>

O(1). Returns queue of no elements.

Returns: Queue<'T>

Queue.fold arg1 arg2 arg3

Full Usage: Queue.fold arg1 arg2 arg3

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

Returns: 'State

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

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

Queue.foldBack arg1 arg2 arg3

Full Usage: Queue.foldBack arg1 arg2 arg3

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

Returns: 'State

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

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

Queue.head arg1

Full Usage: Queue.head arg1

Parameters:
Returns: 'T

O(1). Returns the first element. (peek)

arg0 : Queue<'T>
Returns: 'T

Queue.isEmpty arg1

Full Usage: Queue.isEmpty arg1

Parameters:
Returns: bool

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

arg0 : Queue<'T>
Returns: bool

Queue.length arg1

Full Usage: Queue.length arg1

Parameters:
Returns: int

O(1). Returns the count of elememts.

arg0 : Queue<'T>
Returns: int

Queue.ofList arg1

Full Usage: Queue.ofList arg1

Parameters:
    arg0 : 'T list

Returns: Queue<'T>

O(1). Returns a queue of the list

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

Queue.ofSeq arg1

Full Usage: Queue.ofSeq arg1

Parameters:
    arg0 : seq<'T>

Returns: Queue<'T>

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

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

Queue.rev arg1

Full Usage: Queue.rev arg1

Parameters:
Returns: Queue<'T>

O(n). Returns queue reversed.

arg0 : Queue<'T>
Returns: Queue<'T>

Queue.tail arg1

Full Usage: Queue.tail arg1

Parameters:
Returns: Queue<'T>

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

arg0 : Queue<'T>
Returns: Queue<'T>

Queue.toSeq arg1

Full Usage: Queue.toSeq arg1

Parameters:
Returns: seq<'T>

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

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

Queue.tryHead arg1

Full Usage: Queue.tryHead arg1

Parameters:
Returns: 'T option

O(1). Returns option first element.

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

Queue.tryTail arg1

Full Usage: Queue.tryTail arg1

Parameters:
Returns: Queue<'T> option

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

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

Queue.tryUncons arg1

Full Usage: Queue.tryUncons arg1

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

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

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

Queue.uncons arg1

Full Usage: Queue.uncons arg1

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

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

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

Active patterns

Active pattern Description

Queue.(|Cons|Nil|) arg1

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

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