2008/11/17 Knut Olav Bøhmer bohmer@gmail.com:
2008/11/16 Attila Lendvai attila.lendvai@gmail.com:
dear list,
i've got this patch pending:
(defmacro ensure-functionf (&rest places) "Call ENSURE-FUNCTION for each place in PLACES and store back the results." `(progn ,@(mapcar (lambda (place) `(setf ,place (ensure-function ,place))) places)))
it might be controversial, so i'll first send it here. if noone complains for a week or two, then i'll push it eventually.
How about makeing ensure-functionf with define-modify-macro
(define-modify-macro ensure-functionf x (ensure-function x))
ok, that was wrong. Sorry. "Think before act"... (define-modify-macro ensure-functionf x ensure-function x) As I can see someone else also wrote..
then
(defun map-ensure-functionf (list) (mapl (lambda (fnames) (ensure-functionf (first fnames))) list))
I did not understand how you plan to use this macro. Maybe there is a reason you made it a macro, and not a function. Can you explain?
-- Knut Olav Bøhmer