Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmacro with-partial-macro (name macro list-of-args &body body)
- "TODO: docu"
- `(macrolet ((,name (more-args)
- `(,,macro ,,@list-of-args ,@more-args)))
- ,@body))
- (defmacro testmacro (&rest args)
- `(+ ,@args))
- ;;; TOOLS> (macroexpand-1 '(with-partial-macro partial-plus testmacro (1 2 3)
- ;;; (partial-plus 4 5 6)))
- ;;;
- ;;; (MACROLET ((PARTIAL-PLUS (MORE-ARGS)
- ;;; `(,TESTMACRO ,1 ,2 ,3 ,@MORE-ARGS)))
- ;;; (PARTIAL-PLUS 4 5 6))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement