Introduction to
Logic Programming
What
versus
How
 

Exercise 10.4 - Deletion


delete is a ternary relation that holds of an object and two lists that holds if and only if the second list is a copy of the first list with all occurrences of the given object deleted. For example, delete(b,[a,b,c,b,d],[a,c,d]) is true. Write a logic program that defines the delete relation.