Queue
final class Queue<Type> < DoubleStack<Type>
Double-ended queue.
Member Functions
Name | Description |
---|---|
front | Get the first element. |
back | Get the last element. |
pushFront | Insert a new element at the start. |
pushBack | Insert a new element at the end. |
popFront | Remove the first element and return it. |
popBack | Remove the last element and return it. |
Member Fibers
Name | Description |
---|---|
walk | Forward iteration. |
Member Function Details
back
function back() -> Type
Get the last element.
front
function front() -> Type
Get the first element.
popBack
function popBack() -> Type
Remove the last element and return it.
popFront
function popFront() -> Type
Remove the first element and return it.
pushBack
function pushBack(x:Type)
Insert a new element at the end.
- x: Value.
pushFront
function pushFront(x:Type)
Insert a new element at the start.
- x: Value.
Member Fiber Details
walk
fiber walk() -> Type!
Forward iteration.
Return: a fiber object that yields each element in forward order.