You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(define-macro (define-symbol-macro . rest)
"(define-symbol-macro (name . args) . body)
Macro that creates special symbol macro for evaluator similar to build in , or `.
It's like alias for real macro. Similar to CL reader macros but it receive already
parsed code like normal macros."
;; this is executed in two different ways one when there are no macro and the other
;; if there is macro defined, in second case it will put list as first element
;; of the body even is it's called like this (define-symbol-macro (# code)
(let* ((def (if (pair? (car rest)) (caar rest) (car rest)))
(symbol (car def))
(code (cdr rest)))
`(begin (add-special! ',symbol) (define-macro ,def ,@code))))
With macro:
code:
output:
The text was updated successfully, but these errors were encountered: