Lisp
;;; Print the words to 99 Bottles of beer.
(defun b (n)
(format nil "~A bottle~A of beer"
n (if (= n 1) "" "s")) )
(defun bb (n)
(format t "~A on the wall, ~A.~%~A ~A.~%"
(b n)(b n)
"Take one down and pass it around, "
(b (1- n)) )
(if (> n 1) (bb (1- n))) )
(bb 99)
Previous slide
Next slide
Back to first slide
View graphic version