Skip to content

Instantly share code, notes, and snippets.

@jmercouris
Created November 26, 2017 19:26
Show Gist options
  • Save jmercouris/66a422ecdbd17be015a4c0b836d21252 to your computer and use it in GitHub Desktop.
Save jmercouris/66a422ecdbd17be015a4c0b836d21252 to your computer and use it in GitHub Desktop.
(defun a (some-arg &optional optional-arg1 optional-arg2)
(b automatically-placed-optional-args))
(defun b (arg1 arg2)
...)
@cbaggers
Copy link

;; variable key args
(defun a (&rest args &key &allow-other-keys)
  (apply #'b args))

(defun b (&key arg1 arg2)
  (list arg1 arg2))

;; variable optional args
(defun c (&rest args)
  (apply #'d args))

(defun d (&optional arg1 arg2)
  (list arg1 arg2))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment