Language Refal
(pattern matching,recursing)
Date: | 03/17/08 |
Author: | rahul |
URL: | http://code.google.com/p/v-language/ |
Comments: | 1 |
Info: | n/a |
Score: | (2.92 in 12 votes) |
* Refal is "Recursive functions algorithmic language" * and is a pattern matching programming language. * This entry uses both recursion and pattern matching * capabilities of refal. $ENTRY Go { = <Sing 99>;}; Sing { s.N = <Prout <Verse s.N>>; }; Beer { 0 = "No more bottles of beer"; 1 = "One bottle of beer"; s.N = s.N "bottles of beer"; }; Verse { 0 = ""; s.N = <Beer s.N> "on the wall.\n" "Take one down, pass it around,\n" <Beer <- s.N 1>> "on the wall\n\n" <Verse <- s.N 1>>; };
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
Refal Plus, using List library | Anton Orlov | 02/11/09 | 0 |
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
rahul said on 03/18/08 10:29:02
There was some mixup in the submission,
the Refal language site is at http://refal.botik.ru/book/html/index.html
More over, this is the same language as Refal-5 (already in the site.)