singleton variables
SWI Prolog sometimes produces an warning message like this:
% cat example.pl
happy(Pet) :-
   dog(Pet),
   walkies(Oet).
% prolog -s example.pl
Warning: example.pl:1:
	Singleton variables: [Oet]
…
This is alerting you to the fact that the variable Oet has only been used once in the rule it appears in. Such variables are often (but not always) spelling mistakes. In this case, Oet should have been Pet.

Sometimes singleton variable reports are caused by the programmer trying to write helpful, readable code, like this version of member:

member(Item, [Item | Rest]).
member(Item, [NotItem | Rest]) :-
    \+ Item = NotItem,
    member(Item, Rest).
Prolog would report
	Singleton variables: [Rest]
for such code, because the helpfully-named variable Rest is only used once in member(Item, [Item | Rest]). The solution is to put an underscore ( _ ) at the start of this instance of Rest, thus replacing member(Item, [Item | Rest]). with member(Item, [Item | _Rest]). SWI Prolog will treat _Rest as a don't-care variable and not report it.