This module provides a set of predicates for list processing.
X is not a singleton.
Zs is Ys appended to Xs.
Reverses the order of elements in Xs.
Reverse the order of elements in A, and append it with B.
L2 is L1 without the ocurrences of E.
L2 is L1 without the ocurrences of E. E can be a nonground term so that all the elements in L1 it unifies with will be deleted
Xs and Ys have the same elements except for one occurrence of X.
Computes the length of L.
Outputs L of length N.
Checks that L is of length N.
N is the position in List of Elem. N counts from one.
Unifies Elem and the Nth element of List.
Finds the positions where Elem is in List. Positions are found in ascending order.
Adds element E after element E0 (or at end) to list L0 returning in L the new list (uses term comparison).
Adds element E before element E0 (or at start) to list L0 returning in L the new list (uses term comparison).
X is a list of Ys of at least one element.
List is the result of removing Tail from the end of DList (makes a difference list from a list).
Adds Term to the end of List if there is no element in List identical to Term.
Impure membership (does not instantiate a variable in its first argument.
X is not identical to any element of L.
X is the last element of list L.
Look up Functor(Key,Value) pair in variable ended key-value pair list L or else add it at the end.
Insert the element B in the ordered set of numbers A.
Delete from the ordered set A the element B.
Succeds iff E is element of Set
Generates an ordered set of numbers from 0 to N-1, and append it to L1.
List has the elements which are both in List1 and List2.
List has the elements which are in List1 followed by the elements which are in List2 but not in List1.
List has the elements which are in List1 but not in List2.
List2 contains all the elements of List1.
List2 contains all the elements of List1 in the same order.
LList is the list of one element lists with elements of List.
LList is the powerset of List, i.e., the list of all lists which have elements of List. If List is ordered, LList and all its elements are ordered.
List is the cartesian product of the lists in LList, that is, the list of lists formed with one element of each list in LList, in the same order.
List is the list of all elements in the (comma-separated) sequence Sequence. The use of this predicate is reversible.
list_of_lists(). list_of_lists([L|Xs]) :- list(L), list_of_lists(Xs).