Availability:C-language interface function
+list, term_t -tail, size_t *len)This is a multi-purpose function to deal with lists. It allows for
finding the length of a list, checking whether something is a list, etc.
The reference tail is set to point to the end of the list,
len is filled with the number of list-cells skipped, and the
return value indicates the status of the list:
- The list is a‘proper' list: one that ends in the list terminator
constant and tail is filled with the terminator constant.
- The list is a‘partial' list: one that ends in a variable and
tail is a reference to this variable.
- The list is cyclic (e.g. X = [a|X]). tail points to an
arbitrary cell of the list and len is at most twice the cycle
length of the list.
- The term list is not a list at all. tail is bound
to the non-list term and len is set to the number of
It is allowed to pass 0 for tail and
NULL for len.