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

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

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

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

terminate_all_lists / 2, terminate_and_get_list / 3