Skip to content

Instantly share code, notes, and snippets.

@earl-ducaine
Last active August 29, 2018 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earl-ducaine/f510eb0091d04e2d0131cffe080f5d28 to your computer and use it in GitHub Desktop.
Save earl-ducaine/f510eb0091d04e2d0131cffe080f5d28 to your computer and use it in GitHub Desktop.
Macro Help -- transform arguments
;; 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