object

# `deque`

Double-ended queue (deque) implementation using difference lists to provide O(1) operations at both ends.

Availability:
`logtalk_load(deques(loader))`
Author: Paulo Moura
Version: 1:0:0
Date: 2026-02-09
Compilation flags:
`static, context_switching_calls`
Implements:
`public` deque_protocol
Extends:
`public` compound
Uses:
list
Remarks:
(none)
Inherited public predicates:
(<)/2 (=:=)/2 (=<)/2 (=\=)/2 (>)/2 (>=)/2 as_deque/2 as_list/2 check/1 depth/2 empty/1 ground/1 length/2 map/2 map/3 new/1 numbervars/1 numbervars/3 occurs/2 peek_back/2 peek_front/2 pop_back/3 pop_front/3 push_back/3 push_front/3 singletons/2 subsumes/2 subterm/2 valid/1 variables/2 variant/2 varnumbers/2 varnumbers/3

## Public predicates

(no local declarations; see entity ancestors if any)

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)