Computer Science Determine the output of the following queries. mystery2(L, [], []). mystery2(L, [H|T], [H|M]) :- member(H, L), mystery2(L, T, M). mystery2(L, [H|T], M) :- \+ member(H, L), mystery2(L,...


Computer Science




Determine the output of the following queries.



mystery2(L, [], []).



mystery2(L, [H|T], [H|M]) :- member(H, L), mystery2(L, T, M).



mystery2(L, [H|T], M) :- \+ member(H, L), mystery2(L, T, M).






  1. mystery2([a, b], [], L).





  2. mystery2([a, b], [], [a,b]).





  3. mystery2([a, b], [a, b], L).





  4. mystery2([a, b, c], [c, e, f], L).





  5. mystery2([], [a,b], L).





  6. In English, what does this rule do?






Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here