[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
multiple-value-setf
- To: <clisp-list@ma2s2.mathematik.uni-karlsruhe.de>
- Subject: multiple-value-setf
- From: sshteingold@cctrading.com
- Date: Thu, 13 Nov 97 16:37:49 -0500
- Return-receipt-to: <sshteingold@cctrading.com>
1. *** Apropos --> `multiple-value-setf' <--
system::multiple-value-setf macro
what does this macro do? may I guess? :)
2. Apparently, multiple-value-bind is implemented using
multiple-value-list, thus it conses (or is it some sort of constant
list?) Is this a performance hit?
3. Why isn't multiple-value-setf in the language?
What's wrong with the following:
(defmacro multiple-value-setf ((&rest exps) form)
(let* ((vars (mapcar (lambda (xx) (gensym "MVSF")) exps))
(combo (mapcan (lambda (xx vv) (list xx vv)) exps vars)))
`(multiple-value-bind (,@vars) ,form
(setf ,@combo))))
(should it be
#-:clisp
(defmacro multiple-value-setf ((&rest exps) form)
(let* ((vars (mapcar (lambda (xx) (gensym "MVSF")) exps))
(combo (mapcan (lambda (xx vv) (list xx vv)) exps vars)))
`(multiple-value-bind (,@vars) ,form
(setf ,@combo))))
#+:clisp
(defmacro multiple-value-setf (&rest all)
`(system::multiple-value-setf ,@all))
??)