next up previous contents
Next: call/1 Up: Some Useful Predicates Previous: fail/0

repeat/0

If it is asked to Redo then it will keep on succeeding.



test:-

repeat

write(hello)

fail.

The goal test produces the output:



hellohellohellohellohellohellohellohellohello...

repeat/0 behaves as if it were defined in Prolog as:



repeat.

repeat:-

repeat.



Paul Brna
Mon May 24 20:14:48 BST 1999