add example syntax-rules honu macro

svn: r16334
This commit is contained in:
Jon Rafkind 2009-10-15 23:38:19 +00:00
parent b6d2fdc274
commit 25bd680141

View File

@ -0,0 +1,32 @@
#lang honu
/*
=>
x = function(q){
print q;
if (q < end){
x(q+1);
}
}
x(start);
*/
macro (to do end) {{ for looper:id = first:expr to last:expr do
body
end
}}
{{
/* display(2); */
var x = function(looper){
display(body); newline();
if (looper < last){
x(looper+1);
}
};
x(first);
}}
for x = 1 to 10 do
x
end