repeat/0
repeat
Nondetermenistic loop.
Remark
The predicate repeat will always succeed, but because of its nondeterminism it will raise the new subgoal at the each loop. repeat is defined as:
repeat.
repeat :- repeat.
Usualy the repeat is used for the fail-controlled loops.
Example
loop :-
repeat,
write ("Yet more loop ?"),
read (YN),
(YN = "N";YN="n").