Skip to content
SinisterRectus edited this page Nov 16, 2019 · 10 revisions

An implementation of a double-ended queue.

Constructor

Deque()

Methods

getCount()

Returns the total number of values stored.

This method only operates on data in memory.

Returns: number


iter()

Iterates over the deque from left to right.

This method only operates on data in memory.

Returns: function


peekLeft()

Returns the value at the left side of the deque without removing it.

This method only operates on data in memory.

Returns: *


peekRight()

Returns the value at the right side of the deque without removing it.

This method only operates on data in memory.

Returns: *


popLeft()

Removes and returns a value from the left side of the deque.

This method only operates on data in memory.

Returns: *


popRight()

Removes and returns a value from the right side of the deque.

This method only operates on data in memory.

Returns: *


pushLeft(obj)

Parameter Type
obj *

Adds a value of any type to the left side of the deque.

This method only operates on data in memory.

Returns: nil


pushRight(obj)

Parameter Type
obj *

Adds a value of any type to the right side of the deque.

This method only operates on data in memory.

Returns: nil


Clone this wiki locally