Closed knorth55 closed 3 years ago
I cannot think of much besides writing another macro that would do the list operations and act like a funcall or apply. Of course this is only hiding the eval under the defmacro stuff, so I don't think there is anything wrong in going for the eval
here.
A simplified version could be something like this:
(defmacro macro-apply (fn arg-lst) (cons fn arg-lst))
(defmacro macro-funcall (fn &rest args) (cons fn args))
(setq a 1)
(macro-apply cond (((equal a 1) (print "hoge")) (t nil)))
;; "hoge"
@Affonso-Gui thank you! I will use eval
.
I want to do
funcall
orapply
like thing withmacro
such ascond
. What is the best way to do it? I do these thing witheval
.