Just like WITH-ACCESSORS, but if the slot-entry is a symbol assume the variable and accessor name are the same.
(defmacro with-accessors* (accessor-names object &body body)
"Just like WITH-ACCESSORS, but if the slot-entry is a symbol
assume the variable and accessor name are the same."
`(with-accessors ,(mapcar (lambda (name)
(if (consp name)
name
`(,name ,name)))
accessor-names)
,object
,@body))Source Context