Logo

Programming-Idioms

History of Idiom 50 > diff from v95 to v96

Edit summary for version 96 by sitting_bull:
[Lisp] Fixing the remarks.

Version 95

2025-01-06, 11:50:40

Version 96

2025-01-24, 11:35:31

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
(do () (nil)
  (write-line "Control-C to quit this infinite loop")
  (sleep 1))
Code
(do () (nil)
  (write-line "Control-C to quit this infinite loop")
  (sleep 1))
Comments bubble
Kill the Lisp process to exit.
DO is the most general kind of loop, supporting local variables and complex iteration logic.
A common alternative is "(LOOP)", but you'll have to learn it's non-Lispy syntax.
Comments bubble
Kill the Lisp process to exit.
DO is the most general kind of loop, supporting local variables and complex iteration logic.
A common alternative is "(LOOP)", but you'll have to learn its non-Lispy syntax.
Doc URL
https://www.lispworks.com/documentation/HyperSpec/Body/m_do_do.htm
Doc URL
https://www.lispworks.com/documentation/HyperSpec/Body/m_do_do.htm