fsprojects/FSharpx.Collections


PhysicistQueue

Namespace: FSharpx.Collections.Experimental

Functions and values

Function or valueDescription
empty ()
Signature: unit -> PhysicistQueue<'?12763>
Type parameters: '?12763

O(1). Returns queue of no elements.

fold f state q
Signature: f:('State -> 'T -> 'State) -> state:'State -> q:PhysicistQueue<'T> -> 'State
Type parameters: 'State, 'T

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

foldBack f q state
Signature: f:('T -> 'State -> 'State) -> q:PhysicistQueue<'T> -> state:'State -> 'State
Type parameters: 'T, 'State

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

head q
Signature: q:PhysicistQueue<'T> -> 'T
Type parameters: 'T

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

isEmpty q
Signature: q:PhysicistQueue<'T> -> bool
Type parameters: 'T

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

length q
Signature: q:PhysicistQueue<'T> -> int
Type parameters: 'T

O(1). Returns the count of elememts.

ofList xs
Signature: xs:'?12779 list -> PhysicistQueue<'?12779>
Type parameters: '?12779

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

ofSeq xs
Signature: xs:seq<'?12781> -> PhysicistQueue<'?12781>
Type parameters: '?12781

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

rev q
Signature: q:PhysicistQueue<'T> -> PhysicistQueue<'T>
Type parameters: 'T

O(1). Returns queue reversed.

snoc x q
Signature: x:'T -> q:PhysicistQueue<'T> -> PhysicistQueue<'T>
Type parameters: 'T

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

tail q
Signature: q:PhysicistQueue<'T> -> PhysicistQueue<'T>
Type parameters: 'T

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

tryGetHead q
Signature: q:PhysicistQueue<'T> -> 'T option
Type parameters: 'T

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

tryGetTail q
Signature: q:PhysicistQueue<'T> -> PhysicistQueue<'T> option
Type parameters: 'T

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

tryUncons q
Signature: q:PhysicistQueue<'T> -> ('T * PhysicistQueue<'T>) option
Type parameters: 'T

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

uncons q
Signature: q:PhysicistQueue<'T> -> 'T * PhysicistQueue<'T>
Type parameters: 'T

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

Active patterns

Active patternDescription
( |Cons|Nil| ) q
Signature: q:PhysicistQueue<'T> -> Choice<('T * PhysicistQueue<'T>),unit>
Type parameters: 'T

CompiledName: |Cons|Nil|

Fork me on GitHub