diff --git a/collects/tests/honu/function-use.honu b/collects/tests/honu/function-use.honu new file mode 100644 index 0000000000..42e2afdbe1 --- /dev/null +++ b/collects/tests/honu/function-use.honu @@ -0,0 +1,15 @@ +#lang honu + +require "function.honu"; + +function foo (a b c){ + display("5"); + newline(); +} + +foo(1, 2, 3); + +function (a b c){ + display(a+b+c); + newline(); +}(1, 2, 3); diff --git a/collects/tests/honu/function.honu b/collects/tests/honu/function.honu new file mode 100644 index 0000000000..e6ff50ad47 --- /dev/null +++ b/collects/tests/honu/function.honu @@ -0,0 +1,9 @@ +#lang honu + +provide function; +macro function () + { _ name:identifier (args:identifier ...) { body ... } } + { #sx scheme:syntax #sx(define (name_result args_result ...) + (honu-unparsed-begin body ...)) } + { _ (args:identifier ...) { body ... }} + { #sx scheme:syntax #sx(lambda (args_result ...) (honu-unparsed-begin body ...)) }