[Small-cl-src] What would var+++ be in CL?

Ingvar ingvar at cathouse.bofh.se
Thu Sep 23 15:05:50 UTC 2004


;;; Possibly a tad naive, but...
(defmacro post-incf (form &optional (increment 1))
  (let ((value (gensym "POST-INCF")))
    `(let ((,value ,form))
       (prog1 ,value (setf ,form (+ ,value ,increment))))))






More information about the Small-cl-src mailing list