succeeds always.
repeat/0 succeeds repeatedly and indefinitely. The difference to true/0 is that it can be backtracked.
Loops which are defined with repeat/0 should be finished with
a Cut ('!'/0), because otherwise the loop can be repeated.
If a predicate, called after repeat/0, always fails, you can have
an indefinite loop. If repeat/0 follows after a conjunction
(','/2) the part left of it won't be backtraced any more.
| repeat, write('indefinitely'), nl, fail. | Writes indefinitely 'indefinitely' to the current outputstream. |
| repeat,!. | Succeeds. |
| repeat,!,fail. | Fails. |
This predicate is part of the ISO-Prolog Standard.