[ library(list_collection) | Reference Manual | Alphabetic Index ]

# terminate_and_get_list(+LCOL, ++Index, -List)

Retrieves the List of elements identified by Index

LCOL
  A list collection
Index
  A ground term or number
List
  A list of terms

## Description

Ensures that the internal List of elements identified by Index is terminated, and returns the internal List. Complexity O(1).

### Modes and Determinism

- terminate_and_get_list(+, ++, -) is det

### Exceptions

(5) type error
  LCOL is not a list collection.
(5) type error
  Index is not a number or is out of range.
(5) type error
  Index is not ground.

## See Also

get_list / 3, terminate_all_lists / 2, reinit / 2