Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Lisp

(backquote based)

Date:04/22/07
Author:jimka
URL:n/a
Comments:0
Info:n/a
Score: (2.89 in 9 votes)
(defun bottles-of-bier (n)
  (case n
   (0
    '(No more bottles of beer on the wall no more bottles of beer.
	 Go to the store and buy some more 99 bottles of beer on the wall.))
   (1
    `(1 bottle of beer on the wall 1 bottle of beer.
	Take one down and pass it around no more bottles of beer on the wall.
	,@(bottles-of-bier 0)))
   (2
    `(2 bottles of beer on the wall 2 bottles of beer.
       Take one down and pass it around 1 bottle of beer on the wall.
       ,@(bottles-of-bier 1)))
   (t
    `(,n bottles of beer on the wall ,n bottles of beer.
	 Take one down and pass it around
	 ,(1- n) bottles of beer on the wall.
	 ,@(bottles-of-bier (1- n))))))

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
1Anonymous04/20/053

Comments

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: