[Bese-devel] m-v-b greenspunned in actions.

Drew Crampsie drewc at tech.coop
Sat Jun 18 19:24:28 UTC 2005


multiple-value-bind (actually m-v-call) doesn't work in actions. Not a 
big deal, but it came up twice in one day, so :

(defun multiple-value-funcall->list (function &rest args)
                    (multiple-value-call #'list (apply function args)))

(defmacro multiple-value-bindf (vars form &body body)
                    `(destructuring-bind ,vars
                      (multiple-value-funcall->list #',(car form) ,@(cdr 
form))
                      , at body))

it works in an action, avoiding a direct call to m-v-c :

 > (multiple-value-bindf (a b c) (values 1 2 3)
                    (list a b c))
=> (1 2 3)

works for me,

drewc







More information about the bese-devel mailing list