protocol
queuep
Queue protocol.
logtalk_load(queues(loader))
static
Public predicates
empty/1
True if the queue is empty.
static
empty(Queue)
empty(@queue)
- zero_or_one
head/2
Unifies Head
with the first element of the queue.
static
head(Queue,Head)
head(+queue,?term)
- zero_or_one
join/3
Adds the new element at the end of the queue.
static
join(Element,Queue,NewQueue)
join(@term,+queue,-queue)
- zero_or_one
join_all/3
Adds the new elements at the end of the queue. The elements are added in the same order that they appear in the list.
static
join_all(List,Queue,NewQueue)
join_all(+list,+queue,-queue)
- zero_or_one
jump/3
Adds the new element at the front of the queue.
static
jump(Element,Queue,NewQueue)
jump(@term,+queue,-queue)
- zero_or_one
jump_all/3
Adds the new elements at the front of the queue. The last element in the list will be at the front of the queue.
static
jump_all(Elements,Queue,NewQueue)
jump_all(+list,+queue,-queue)
- zero_or_one
jump_all_block/3
Adds the new elements as a block at the front of the queue. The first element in the list will be at the front of the queue.
static
jump_all_block(Elements,Queue,NewQueue)
jump_all_block(+list,+queue,-queue)
- zero_or_one
append/3
Appends two queues. The new queue will have the elements of the first queue followed by the elements of the second queue.
static
append(Queue1,Queue2,NewQueue)
append(+queue,+queue,-queue)
- one
length/2
Queue length.
static
length(Queue,Length)
length(+heap,?integer)
- zero_or_one
serve/3
Removes the first element of the queue for service.
static
serve(Queue,Head,NewQueue)
serve(+queue,?term,-queue)
- zero_or_one
as_list/2
Converts a queue to a list.
static
as_list(Queue,List)
as_list(+queue,-list)
- one
map/2
Applies a closure to all elements of a queue.
static
map(Closure,Queue)
map(1,*)
map(+callable,+queue)
- zero_or_one
map/3
Applies a closure to all elements of a queue constructing a new queue.
static
map(Closure,Queue,NewQueue)
map(2,*,*)
map(+callable,+queue,?queue)
- zero_or_one
Protected predicates
(none)
Private predicates
(none)
Operators
(none)
See also