Make that test macro more lispy
This commit is contained in:
parent
5a74fff7e6
commit
bd478590fa
@ -2,7 +2,7 @@
|
|||||||
"NATIVE: test stararged native macros"
|
"NATIVE: test stararged native macros"
|
||||||
(defmacro rev [&rest body]
|
(defmacro rev [&rest body]
|
||||||
"Execute the `body` statements in reverse"
|
"Execute the `body` statements in reverse"
|
||||||
(+ (quote (do)) (list (reversed body))))
|
(quasiquote (do (unquote-splice (list (reversed body)))))))
|
||||||
|
|
||||||
(setv x [])
|
(setv x [])
|
||||||
(rev (.append x 1) (.append x 2) (.append x 3))
|
(rev (.append x 1) (.append x 2) (.append x 3))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user