[honu] add some simple macro examples

This commit is contained in:
Jon Rafkind 2011-11-10 20:49:57 -07:00
parent 9f81387e85
commit 786436b314

View File

@ -6,3 +6,14 @@ testx 5 * 2
for z = 1 to testx 5 * 2 do
printf("z is ~a\n", z)
macro testfor () {x:expression} {
syntax(for z = 1 to x_result do
printf("z is ~a\n" z))
}
macro testfor2 () {x:expression}{
syntax(testfor x_result * 2)
}
testfor2 1 + 2