Question: Q 3 . Consider the following program: set _ dif ( [ ] , Y , Y ) . set _ dif ( [ Y

Q3. Consider the following program:
set_dif([],Y,Y).
set_dif([Y|R],X,Z) :-
member(X,Y),
set_dif(Y ,X ,Z),!.
set_dif([X |R ],Y ,[X |Z ]) :-
set_dif(Y ,R , Z).
What is the output of the following?
? set_dif([2,4,6,8],[4,5,6,7,8],L).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!