<< >> Up Title Contents

3.3.1. Exercise

Here is a modified version of the standard definition of member/2; one with a cut in the first clause. How does its behaviour differ from the standard member/2, and why?

member(Item, [Item|_]):- !.
member(Item, [_|Tail]):-
	member(Item, Tail).


<< >> Up Title Contents