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 Hume

(Resource aware systems language)

Date:04/20/09
Author:Greg Michaelson
URL:http://www.macs.hw.ac.uk/~greg
Comments:0
Info:http://www.hume-lang.org
Score: (3.50 in 2 votes)
stream output to "std_out";

box bottles
in (n::int 64)
out (n'::int 64,v::string)
match 
0 -> (99,("No more bottles of beer on the wall, ",
          "no more bottles of beer.\n",
          "Go to the store and buy some more, ",
          "99 bottles of beer on the wall.\n") as string) |
n -> (n-1,(n," bottles of beer on the wall, ",
           n," bottles of beer.\n",
           "Take one down and pass it around, ",
           n-1,"bottles of beer on the wall.\n") as string);

wire bottles (bottles.n' initially 99) (bottles.n,output);

Download Source | Write Comment

Alternative Versions

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: