Category talk:Wren-queue: Difference between revisions
m
→Source code: Now uses Wren S/H lexer.
(→Source code: Removed type aliases which are no longer needed.) |
m (→Source code: Now uses Wren S/H lexer.) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 18:
===Source code===
<
/* Queue represents a FIFO list of values. */
Line 51:
pop() {
var item = peek()
if (!(item
_queue.removeAt(0)
}
Line 124:
popFront() {
var item = peekFront()
if (!(item
_deque.removeAt(0)
}
Line 134:
popBack() {
var item = peekBack()
if (!(item
_deque.removeAt(-1)
}
Line 225:
pop() {
var e = peek()
if (!(e
_pqueue.removeAt(0)
}
Line 254:
// Returns the string representation of the priority queue's underlying list.
toString { _pqueue.toString }
}</
|