(defun fun (a b c &optional d e &rest f) (mapc 'princ (list "Required: a: " a " b: " b " c: " c "\n")) (mapc 'princ (list "Optional: d: " d " e: " e "\n")) (mapc 'princ (list "Rest : f: " f "\n")) t) fun (fun 1 2 3) Required: a: 1 b: 2 c: 3 Optional: d: nil e: nil Rest : f: nil t (fun 1 2 3 4) Required: a: 1 b: 2 c: 3 Optional: d: 4 e: nil Rest : f: nil t (fun 1 2 3 4 5 6 7 8 9) Required: a: 1 b: 2 c: 3 Optional: d: 4 e: 5 Rest : f: (6 7 8 9) t (defsubst abs (x) (if (>= x 0) x (- x))) abs (abs 3) 3 (abs -4) 4 (defun difference (n m) (abs (- n m))) difference (difference 6 9) 3 (symbol-function 'difference) (lambda (n m) (abs (- n m))) (defun move-line (L) (interactive "nNr of lines:") (forward-line L)) move-line