Lecture 1
Lecture 2
Lecture 3
Lecture 4
Lecture 5


To begin with, don't worry about the cut or about the fact that only the first element matching the specified term should be removed. Just write a predicate which recursively searches throught the input list until it finds an element matching with the term that was specified and deletes this element.

Don't forget that the list should be returned unchanged in case that no matching element is found.

When you have specified this predicate, try to figure out where you have to place the cut in order to prevent Prolog from backtracking after is has found and deleted a suitable element.


Back to the exercise.