Open spy16 opened 4 years ago
[]
(def my-macro (macro* [& rest] []))
my-macro
(def a-list '(my-macro 1 2 "hello"))
a-list
(my-macro 1 2 "hello")
(eval a-list)
(do [])
[]
on expansion :(def my-macro (macro* [& rest] []))
my-macro
when evaluated:(def a-list '(my-macro 1 2 "hello"))
a-list
represents the list(my-macro 1 2 "hello")
(eval a-list)
a-list
which is now result of macro expansion (i.e.,(do [])
) instead of its original value(my-macro 1 2 "hello")
.