[honu] add some examples
This commit is contained in:
parent
0bac61f538
commit
d374fab4ca
15
collects/tests/honu/flow.honu
Normal file
15
collects/tests/honu/flow.honu
Normal file
|
@ -0,0 +1,15 @@
|
|||
#lang honu
|
||||
|
||||
foo(x){
|
||||
x + 1
|
||||
}
|
||||
|
||||
bar(x){
|
||||
x * 2
|
||||
}
|
||||
|
||||
buz(z){
|
||||
z - 4
|
||||
}
|
||||
|
||||
foo(5) | bar | buz
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user