RosettaCodeData/Task/Four-is-magic/Common-Lisp/four-is-magic.lisp
2023-07-01 13:44:08 -04:00

7 lines
397 B
Common Lisp

(defun integer-to-text (int)
(format nil "~@(~A~)" (with-output-to-string (out)
(loop for n = int then (length c)
for c = (format nil "~R" n)
while (/= n 4)
do (format out "~A is ~R, " c (length c))
finally (format out "four is magic.")))))