99 Bottles of Beer/Lisp: Difference between revisions

Make the format string prettier (riiight)
m (updated Ol sample)
(Make the format string prettier (riiight))
Line 35:
<lang lisp>(defun bottles (x)
(loop for bottles from x downto 1
do (format t "~a bottle~:p of beer on the wall~@
~:*~a bottle~:p of beer~@
Take one down, pass it around~@
~a bottle~:p of beer on the wall~2%" bottles (1- bottles))))</lang>
bottles (1- bottles))))</lang>
and then just call
<lang lisp>(bottles 99)</lang>