Brian McCallister
Posts: 1282
Nickname: frums
Registered: Sep, 2003
Brian McCallister is JustaProgrammer who thinks too much.
(apparently (am I Lisp))
Posted: Nov 3, 2004 5:27 AM
This post originated from an RSS feed registered with Java Buzz
by Brian McCallister.
Original Post: (apparently (am I Lisp))
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time
Advertisement
You are... Lisp!
(define bottles
(lambda (n)
(cond ((= n 0) (display "No more bottles"))
((= n 1) (display "One bottle"))
(else (display n) (display " bottles")))
(display " of beer")))
(define beer
(lambda (n)
(if (> n 0)
(begin
(bottles n) (display " on the wall") (newline)
(bottles n) (newline)
(display "Take one down, pass it around") (newline)
(bottles (- n 1)) (display " on the wall") (newline)
(newline)
(beer (- n 1))))))
(beer 99)
What programming language are you?
This one is pretty manipulable if you know anything bout languages, and isn't all that clever, but is fun anyway =)
Read: (apparently (am I Lisp))