Succeeds repeatedly and indefinitely. The predicate is defined in the system module as:
repeat :- true.
repeat :- repeat.
There is an example of using this predicate in asking the user a question.
see also: always/2 call/1 catch/2 catch/3 fail/0 halt/0 halt/1 if-then/2 if-then-else/2 once/1 throw/1 true/0
| Examples | |
| repeat, !. | succeeds |
| repeat, !, fail. | fails |
| repeat, X=1, fail. | is executed indefinitely |