[honu] add some examples

This commit is contained in:
Jon Rafkind 2011-08-12 15:16:22 -06:00
parent 0bac61f538
commit d374fab4ca
2 changed files with 19 additions and 9 deletions

View File

@ -0,0 +1,15 @@
#lang honu
foo(x){
x + 1
}
bar(x){
x * 2
}
buz(z){
z - 4
}
foo(5) | bar | buz

View File

@ -1,12 +1,7 @@
#lang honu
/*
require (forSyntax "struct-patterns.honu");
// structure foo (bar) {a, b, c};
structure foo {a, b, c};
provide struct;
macro struct () {
_ name {field:structField ...} ;
} {
schemeSyntax#sx(honu-struct name (field_name_result ...))
}
*/
var x = foo(1, 2, 3);
printf("x.a: ~a\n", x.a);