Self-test 9 Hint

Multiple solutions in list processing

If you're having difficulty with this task, it may be because you haven't thought about the terminating condition.

The terminating condition pattern for delete_element/3 is terminate when a specified element has been found. If you're going to delete all instances of an item from a list, you need to terminate when the empty list is found.

As an extra hint, you might also think about the number of recursive clauses you need.