<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% Example: incompleteness of Prolog's search strategy
% Note that this a problem of pure Prolog, not with FortProg/SWI!

p :- p.
p.

% Loops infinitely with standard Prolog strategy:
% ?- p.


last([K|R],E) :- last(R,E).
last([E],E).

% Loops infinitely:
% ?- last(L,3).
</pre></body></html>