delete_all can succeedin any of three ways...
delete_all([E|Tail], E, Res) :- delete_all(Tail, E, Res).
delete_all([Head|Tail], E, [Head|Res]) :- delete_all(Tail, E, Res).
Order in file only tells which rules are attempted first—later matching rules can be used after backtracking!