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

   Retrieves the List of elements identified by Index

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

Type
   library(list_collection)

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 --- LCOL is not a list collection.
     5 --- Index is not a number or is out of range.
     5 --- Index is not ground.

See Also
   get_list / 3, terminate_all_lists / 2, reinit / 2
