protocol

# queuep

> Queue protocol.

author:
  `Paulo Moura`
version:
  `1.0`
date:
  `2000/7/24`

compilation flags:
  `static`

(no dependencies on other files)

## Public interface

### empty/1

> True if the queue is empty.

compilation flags:
  `static`
template:
  `empty(Queue)`
mode – number of proofs:
  `empty(@queue) – zero_or_one`

### head/2

> Unifies Head with the first element of the queue.

compilation flags:
  `static`
template:
  `head(Queue,Head)`
mode – number of proofs:
  `head(+queue,?term) – zero_or_one`

### join/3

> Adds the new element at the end of the queue.

compilation flags:
  `static`
template:
  `join(Element,Queue_in,Queue_out)`
mode – number of proofs:
  `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.

compilation flags:
  `static`
template:
  `join_all(List,Queue_in,Queue_out)`
mode – number of proofs:
  `join_all(+list,+queue,-queue) – zero_or_one`

### jump/3

> Adds the new element at the front of the queue.

compilation flags:
  `static`
template:
  `jump(Element,Queue_in,Queue_out)`
mode – number of proofs:
  `jump(@term,+queue,-queue) – zero_or_one`

### jump_all/3

> Adds the new elements at the front of the queue. The elements are added in the same order that they appear in the list.

compilation flags:
  `static`
template:
  `jump_all(Element,Queue_in,Queue_out)`
mode – number of proofs:
  `jump_all(+list,+queue,-queue) – zero_or_one`

### length/2

> Queue length.

compilation flags:
  `static`
template:
  `length(Queue,Length)`
mode – number of proofs:
  `length(+queue,?integer) – zero_or_one`

### serve/3

> Removes the first element of the queue for service.

compilation flags:
  `static`
template:
  `serve(Queue_in,Head,Queue_out)`
mode – number of proofs:
  `serve(+queue,?term,-queue) – zero_or_one`

### as_list/2

> Converts a queue to a list.

compilation flags:
  `static`
template:
  `as_list(Queue,List)`
mode – number of proofs:
  `as_list(+queue,-list) – one`

## Protected interface

(none)

## Private predicates

(none)

## Operators

### (none)

## Remarks

### (none)