Logo

Programming-Idioms

History of Idiom 50 > diff from v45 to v46

Edit summary for version 46 by Erk:
New Prolog implementation by user [Erk]

Version 45

2019-09-26, 15:47:54

Version 46

2019-09-26, 19:45:18

Idiom #50 Make an infinite loop

Write a loop which has no end clause.

Idiom #50 Make an infinite loop

Write a loop which has no end clause.

Code
repeat, write("hello\n").
Comments bubble
This a bit strange, repeat is a predicate that will always succeed, that is always true.
Doc URL
https://www.swi-prolog.org/pldoc/doc_for?object=repeat/0