簡單的 LOOP 形式
沒有特殊關鍵字的簡單 LOOP 表單:
(loop forms...)
為了擺脫迴圈,我們可以使用 (return <return value>)
`
一些例子:
(loop (format t "Hello~%")) ; prints "Hello" forever
(loop (print (eval (read)))) ; your very own REPL
(loop (let ((r (read)))
(typecase r
(number (return (print (* r r))))
(otherwise (format t "Not a number!~%")))))