Language Navel
Date: | 04/20/05 |
Author: | Greg Michaelson |
URL: | n/a |
Comments: | 0 |
Info: | n/a |
Score: | (2.50 in 12 votes) |
# Bottles of beer in Navel Greg Michaelson greg@cee.hw.ac.uk # def itos n = if n=0 then "0" else itos1 "" n; def itos1 l n = if n=0 then l else itos1 (char (n%10+'0')):l n/10; def verse n = {(itos n) " bottle(s) of beer on the wall\n" (itos n) " bottle(s) of beer on the wall\n" "Take one down and pass it around\n" (itos n-1) " bottle(s) of beer on the wall\n"}; def verses n = if n=0 then () else let v = write (?(verse n)) in verses n-1;
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