[alexandria-devel] ensure-functionf
Knut Olav Bøhmer
bohmer at gmail.com
Mon Nov 17 09:29:18 UTC 2008
2008/11/16 Attila Lendvai <attila.lendvai at 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))
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
More information about the alexandria-devel
mailing list