First, there is a group of common list operations.
Append returns a new list with the elements of l followed by the element x .
Combine returns a new list that has the elements of both l1 and l2 in no defined order.
Concat returns a new list that has the elements of l1 followed by the elements of l2 .
Delete returns a new list in which the first element of l that is equal to x has been removed (all others remain). X must be an adt reference type T with an operation T .eq that returns true (non-zero) if two values of type T are considered equal.
Find finds the first instance of x in list l and returns the tail of l with x at its head. Find returns nil if there is no instance of x in l .
Ismember returns 1 if there is an element of l that is equal to x .
Last returns the value of the element at the end of list l . A run-time error occurs if l is nil.
Pair takes two lists l1 and l2 , and returns a new list of tuples ( v1, v2 ) in which each element of l1 has been paired with the corresponding element of l2 . A run-time error occurs if the lists are not equal in length.
Reverse returns a new list containing the elements of l in reverse order.
Unpair takes a list of tuples ( v1, v2 ) and returns a tuple of lists ( l1, l2 ) where l1 contains the first element of each tuple, and l2 contains the second element of each tuple.
A second group of operations applies a function f or a Boolean predicate p to each element of a list l , returning a transformed list or a Boolean value. A predicate p must return non-zero if its parameter value satisfies its condition, and must return zero if it does not.
Allsat returns 1 if all elements of l satisfy p , and returns 0 otherwise.
Anysat returns 1 if any element of l satisfies p , and returns 0 otherwise.
Filter returns a new list containing only the elements of l that satisfy p .
Map returns a new list in which each element of l has been transformed by f (ie, if l is e0 :: e1 :: ... then the result is f(e0) :: f(e1) :: ... ).
Partition returns a tuple of lists ( l1, l2 ) of lists where l1 contains all elements of l that satisfy p and l2 contains all elements of l that do not satisfy p .