multiple-value-bindf is a macro like m-v-b, only it works in CPS's code.
[clinton/lisp-on-lines.git] / src / mewa / slot-presentations.lisp
index 131d01c..7a6671e 100644 (file)
@@ -1,5 +1,12 @@
 (in-package :it.bese.ucw)
 
 (in-package :it.bese.ucw)
 
+(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))
+                    ,@body))
 
 (defslot-presentation clsql-wall-time-slot-presentation (mewa-relation-slot-presentation)
        ()
 
 (defslot-presentation clsql-wall-time-slot-presentation (mewa-relation-slot-presentation)
        ()