Language Scheme
(define-less version)
Date: | 10/14/10 |
Author: | lambda the ultimate |
URL: | n/a |
Comments: | 0 |
Info: | n/a |
Score: | ![]() |
((lambda (f count) (f f count)) (lambda (f count) (cond ((= count 0) (write (string-append "No more bottles of beer on the wall, " "no more bottles of beer. ")) (newline) (write (string-append "Go to the store and buy some more, " "99 bottles of beer on the wall.")) (newline)) (else (write (string-append (number->string count) (if (> count 1) " bottles " " bottle ") "of beer on the wall, " (number->string count) (if (> count 1) " bottles " " bottle ") "of beer.")) (newline) (write (string-append "Take one down and pass it around, " (if (= count 1) "no more" (number->string (- count 1))) (if (= count 2) " bottle " " bottles ") "of beer on the wall")) (newline) (newline) (f f (- count 1))))) 99)
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
original version | Tim Goodwin | 04/20/05 | 2 | ![]() ![]() |
REALLY using hygienic macros | NMH | 02/02/11 | 0 | ![]() ![]() |
slightly shorter, efficient, featureful | Ricardo Malafaia | 08/29/05 | 1 | ![]() ![]() |
uses the hygenic macro system | Evan Farrer | 08/11/05 | 2 | ![]() ![]() |
Cleanly factored MAP-based version | Gnomon | 04/18/08 | 2 | ![]() ![]() |
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!
Comments