Language Nial
(transformers,pointfree style,arrays)
Date: | 03/16/08 |
Author: | rahul |
URL: | http://code.google.com/p/v-language/ |
Comments: | 1 |
Info: | n/a |
Score: | (4.33 in 3 votes) |
% A program in a languae with the pedigree of APL is not worth % its bits if it does not make use of its arrays. % surprisingly (or not) most of recursive functions can be transformed % into a form using a stack of pre-computed arguments. % this code transforms the initial array (created by count XXX) % into verses. Along the way it makes use of transformers and % demonstrates point free programming. line is fork [ 0=, 'No more bottles of beer' first, 1=, 'One bottle of beer' first, link [string,' bottles of beer' first] ] verse is link [ line, ' on the wall, ' first,line, '. Take it down and pass it around, ' first, line (-1+),'on the wall. ' first ] bottles is iterate (write verse) reverse count
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
rahul said on 03/18/08 10:34:15
There was a slight mixup with the submission, the Nial site is <a href="http://www.nial.com/">http://www.nial.com/</a>