Check if currently empty.
Peek the first element.
Peek the first element. Retries if empty.
Enqueue a value.
Dequeue the first element.
Dequeue the first element. Retries if currently empty.
Attempt to peek the first element.
Attempt to peek the first element. Returns
None
if empty, Some(head)
otherwise.
Attempt to dequeue the first element.
Attempt to dequeue the first element. Returns
None
if empty, Some(head)
otherwise.
(Since version ) see corresponding Javadoc for more information.
Convenience definition of a queue in the
STM
monad.