[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: understanding backquote
From: |
Olaf Rogalsky |
Subject: |
Re: understanding backquote |
Date: |
Wed, 3 Jun 2015 06:23:11 -0400 |
For my amusement, I have written another variation on this subject::
(defun recursive-map (fun expr)
(funcall fun (if (consp expr)
(cons (recursive-map fun (car expr))
(recursive-map fun (cdr expr)))
expr)))
(defun eval-when-read (expr)
(if (and (consp expr) (eq (car expr) 'eval-when-read))
(eval (cadr expr))
expr))
(defmacro read-wrapper (&rest body)
(cons 'progn
(mapcar (apply-partially 'recursive-map 'eval-when-read)
body)))
(read-wrapper
(defun test ()
(eval-when-read (* (+ 1 2) (+ 3 4)))))
Olaf
- Re: understanding backquote, (continued)
Message not available
- Re: understanding backquote, Barry Margolin, 2015/06/02
- Re: understanding backquote, Olaf Rogalsky, 2015/06/02
- Message not available
- Re: understanding backquote, Pascal J. Bourguignon, 2015/06/02
- Re: understanding backquote, Olaf Rogalsky, 2015/06/02
- Message not available
- Re: understanding backquote, Stefan Monnier, 2015/06/02
- Re: understanding backquote, Olaf Rogalsky, 2015/06/03
- Re: understanding backquote,
Olaf Rogalsky <=
Message not availableRe: understanding backquote, Pascal J. Bourguignon, 2015/06/02