Deque.peekfront

From OpenEUO
Jump to: navigation, search

Calling Pattern

Call

local d = sl.deque()
-- later
local r = d.peekfront()

Results

r is any type

Description

Calling peekfront returns the value at the front of the queue, without actually removing it. If the queue is empty, peekfront returns nil. Deque.front is a synonym for peekfront.

Upon Error

Errors are reported and handled according to the operant error redirection mode.

See Also