
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
If the internal list identified by Index is open, the elements from the list are copied to a closed List and returned. The internal list remains open. Complexity O(|List|).
            If the internal list identified by Index is closed, the internal list is returned immediately as List. Complexity O(1).

Modes and Determinism
   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
   terminate_all_lists / 2, terminate_and_get_list / 3
