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 v

(Uses tailrec and internal functions.)

Date:12/26/07
Author:rahul
URL:http://code.google.com/p/v-language/
Comments:0
Info:http://en.wikipedia.org/wiki/V_%28programming_language%29
Score: (3.02 in 177 votes)
[beer
  [newline '' puts].

  [bottles
    [0 =] ['No more bottles of beer' put] if
    [1 =] ['One bottle of beer' put] if
    [1 >] [dup put ' bottles of beer' put] if].

  [0 =] [newline]
    [bottles ' on the wall, ' put bottles newline
    'Take one down and pass it around, ' put pred bottles ' on the wall' puts newline]
  tailrec].

99 bottles

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: