Most list operations are defined in the library library(lists) 
described in section A.11. Some 
that are implemented with more low-level primitives are built-in and 
described here.
[]) or 
a term with functor `.[] or [_|_] and proper_list/1 
had the role of the current is_list/1. 
The current definition conforms to the de-facto standard. Assuming 
proper coding standards, there should only be very few cases where a 
quick-and-dirty is_list/1 
is a good choice. Richard O'Keefe pointed at this issue. 
This predicate acts as if defined by the definition below on
acyclic terms. The implementation fails safely if
Term represents a cyclic list.
is_list(X) :-
        var(X), !,
        fail.
is_list([]).
is_list([_|T]) :-
        is_list(T).
once(member(Elem, List)).type_error if List 
is a cyclic list or not a list.Key-Value, 
that is, terms whose principal functor is (-)/2, whose first argument is 
the sorting key, and whose second argument is the satellite data to be 
carried along with the key. keysort/2 
sorts List like msort/2, 
but only compares the keys. It is used to sort terms not on standard 
order, but on any criterion that can be expressed on a multi-dimensional 
scale. Sorting on more than one criterion can be done using terms as 
keys, putting the first criterion as argument 1, the second as argument 
2, etc. The order of multiple elements that have the same Key 
is not changed. The implementation is in C, using natural merge sort. 
Fails with a type_error if List is a cyclic list 
or not a list or one of the elements of List is not a pair.<>=