Language HOP
(Functional laguage for web 2 programming)
Date: | 04/03/10 |
Author: | jeeve |
URL: | n/a |
Comments: | 0 |
Info: | http://hop.inria.fr |
Score: | (3.00 in 2 votes) |
(define (bottles n) (cond ((= n 0) "No more bottles of beer") ((= n 1) "One bottle of beer") (else (string-append (integer->string n) " bottles of beer")))) (define (beer n) (if (>= n 0) (append (list (<TR> (<TD> (bottles n) " on the wall, " (bottles n) ".")) (if (> n 0) (<TR> (<TD> "Take one down, pass it around, " (bottles (- n 1)) " on the wall.")) (<TR> (<TD> "Go to the store and buy some more, " (integer->string beers-number) " bootles of beer on the wall."))) (<TR> (<TD> (<P>)))) (beer (- n 1))) '())) (define beers-number 99) (define-service (beers) (<HTML> (<BODY> (<TABLE> (beer beers-number)))))
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