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

Douglas Philips dgou at mac.com
Thu Sep 23 18:36:13 UTC 2004


On Sep 23, 2004, at 11:05 AM, Ingvar wrote:

> ;;; 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))))))

Actually, this came up on comp.lang.lisp and a few good versions were 
posted there.
i'm accessing the net via a temp. connection (i'm on vacation), else 
I'd just search and give the pointer to the posts myself.
	<D\'gou





More information about the Small-cl-src-discuss mailing list