Language Surf
Date: | 04/20/05 |
Author: | Anonymous |
URL: | n/a |
Comments: | 0 |
Info: | n/a |
Score: | (3.00 in 7 votes) |
(begin 'SINGING (define HOW-MANY-BOTTLES (lambda (bottles where) (format stdout "%d bottle%d of beer%d\n" (list (if (> bottles 0) bottles "No more") (if (= bottles 1) "" "s") where)))) (recurse DRINKING (bottles 99) (how-many-bottles bottles " on the wall,") (how-many-bottles bottles ",") (if (= bottles 0) (display stdout "Go the the store, and buy some more!\n") (begin (display stdout "You take one down, pass it around,\n") (how-many-bottles (- bottles 1) " on the wall.\n") (drinking (- bottles 1))))) 'GO-TO-THE-STORE)
Download Source | Write Comment
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