This library provides commonly accepted basic predicates for list manipulation in the Prolog community. Some additional list manipulations are built-in. See e.g., memberchk/2, length/2.
The implementation of this library is copied from many places. These include: "The Craft of Prolog", the DEC-10 Prolog library (LISTRO.PL) and the YAP lists library.
member(X, [One]).
ListOfLists | must be a list of -possibly- partial lists |
?- select(b, [a,b,c], 2, X). X = [a, 2, c] ; X = [a, b, c].
==
), delete first/all, be deterministic or
not.
|
List|
^
2.
|
Set1|
*|
Set2|
|
Set1|
*|
Set2|
|
SubSet|
*|
Set|
.
|
Delete|
*|
Set|
.