The predicate repeat, which is defined as follows, is a built-in predicate that is often used to express iteration.
repeat.
repeat:-repeat.
For example, the query
repeat,write(a),fail
repeatedly outputs 'a', until users type ^C
to stop it.
Neng-Fa Zhou
2013-01-25