Question: Write a Prolog rule myDelete(A, List1, List2) which deletes all occurrences of item A from List1 to produce result List2. As an example, running query

Write a Prolog rule myDelete(A, List1, List2) which deletes all occurrences of item A from List1 to produce result List2. As an example,

running query myDelete(b, [b,c,d,b,c,b], Result). should give us Resul t = [ c , d , c ]. Then, extend your Prolog rule so that it asks the user for the name of the output file so that it can present the result in that output file.

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!