(defmacro tuplet (definitions &body body &aux (g (gensym)) (nv (gensym))) `(LABELS ,(loop for (name slots) in definitions collect `(,name ,slots (VECTOR ,@slots)) append (loop for slot in slots for i from 0 collect `(,slot (,g) (SVREF ,g ,i)) collect `((setf ,slot) (,nv ,g) (SETF (SVREF ,g ,i) ,nv)))) ,@body)) (defun foo () (tuplet ((item (the-sym dash-count))) (mapcar #'the-sym (sort (mapcar (lambda (s) (item s (count #\- (string s)))) (apropos-list "MAKE" :CL)) #'> :key #'dash-count))))