Question: 2- A- Write your own version of the relation concat(Xs, Ys, R) (or append) which holds if R is the concatenation of the lists
2- A- Write your own version of the relation concat(Xs, Ys, R) (or append) which holds if R is the concatenation of the lists Xs and Ys. B- Based only on the relation you wrote in part A, write the following relations: . prefix(Prefix,L) which holds if Prefix is an initial sublist of L. suffix(Suffix,L) which holds if Suffix is a terminal sublist of L. member(X,L) which holds if element X is in the list L. . adjacent(X,Y,L) which holds if elements X and Y are adjacent in the list L. last(X,L) which holds if X is the last element of the list L.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
