Assume that you have member/2 where member(X, Y) checks whether X is an element of a list Y. Complete the first clause of the following Prolog program subset/2 where subset(A, B) will establish a relationship of A being a subset of B. subset([X|R],S) :- ________ %% the body should be... subset([ ],_).

Respuesta :

Answer:

Refer below.

Explanation:

Assume that you have member/2 where member(X, Y) checks whether X is an element of a list Y. Complete the first clause of the following Prolog program subset/2 where subset(A, B) will establish a relationship of A being a subset of B. subset([X|R],S) :- ________ %% the body should be... subset([ ],_).

subset([X|R],S) :-

subset([ ],_).

member(X,S), subset(R,S)

ACCESS MORE