diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/011/macros-4.tl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/011/macros-4.tl b/tests/011/macros-4.tl new file mode 100644 index 00000000..440dcd9e --- /dev/null +++ b/tests/011/macros-4.tl @@ -0,0 +1,11 @@ +(load "../common") + +(defmacro xsqrt (:match :form f) + (((* @exp @exp)) exp) + (@else f)) + +(defmacro xexpt (:match :form f) + ((@exp 2) ^(* ,exp ,exp)) + (@else f)) + +(test (expand '(xsqrt (xexpt x 2))) x) |