fork download
  1. (defun make-table (&rest symbols)
  2. (pairlis symbols (mapcar #'symbol-function symbols)))
  3.  
  4. (format t "~(~{~&~a~}~)"
  5. (make-table '+ 'cons 'make-table))
  6.  
  7. (defmacro make-table-macro (&rest symbols)
  8. `(list ,@(mapcar (lambda (symbol) `(cons ',symbol #',symbol)) symbols)))
  9.  
  10. (format t "~(~%~%macroexpand: ~a~%~{~%~a~}~)"
  11. (macroexpand '#1=(make-table-macro + - *))
  12. #1#)
Success #stdin #stdout 0s 10496KB
stdin
Standard input is empty
stdout
(make-table .
 #<function make-table (&rest symbols) (declare (in-defun make-table))
   (block make-table (pairlis symbols (mapcar #'symbol-function symbols)))>)
(cons . #<system-function cons>)
(+ . #<system-function +>)

macroexpand: (list (cons '+ #'+) (cons '- #'-) (cons '* #'*))

(+ . #<system-function +>)
(- . #<system-function ->)
(* . #<system-function *>)