;;;; bottles2.lsp

;;; Solution based on using list routines
;;;
(defun bottles (X)
 "Song '99 bottles on the wall'"
  (let ((stock (maplist #'length (make-list X :initial-element 1))))
    (mapc #'(lambda (X)
	      (let ()
		(if (= X 1)
		    (format t "1 bottle of beer on the wall. ")
		  (format t "~a bottles of beer on the wall. " X))
		(format t "Take one down, and pass it around.~%")))
	  stock)
    (format t "Now, they are all gone.")))
