Logo

Programming-Idioms

History of Idiom 50 > diff from v79 to v80

Edit summary for version 80 by GeoffChurch:
New Prolog implementation by user [GeoffChurch]

Version 79

2022-02-23, 21:04:22

Version 80

2022-02-23, 21:05:34

Idiom #50 Make an infinite loop

Write a loop that has no end clause.

Ouroboros eating its own tail

Idiom #50 Make an infinite loop

Write a loop that has no end clause.

Ouroboros eating its own tail
Extra Keywords
unbounded,unlimited,never,ouroboros,uroboros
Extra Keywords
unbounded,unlimited,never,ouroboros,uroboros
Code
loop :- loop.

?- loop.
Comments bubble
loop succeeds if loop succeeds, so when we ask the top level if loop succeeds, it proceeds to ask if loop succeeds.