Last active
August 29, 2018 21:01
-
-
Save earl-ducaine/f510eb0091d04e2d0131cffe080f5d28 to your computer and use it in GitHub Desktop.
Macro Help -- transform arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; A macro that would transform this: | |
(my-macro my-function (medium pathname options) | |
(list medium pathname options)) | |
;; Into: | |
(defun my-function (&rest rest) | |
(let ((medium (nth 0 rest)) | |
(pathname (nth 1 rest)) | |
(options (nth 1 rest))) | |
(list medium pathname options))) | |
;; I.e. change function signature without changing semantics. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment