From: Owen Rodley Date: Sat, 27 Apr 2013 12:33:31 +0000 (+1200) Subject: Fix POP X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=34e9698ec9f10c85b5223d154a7f4fe21c07c706;p=jscl.git Fix POP --- diff --git a/src/list.lisp b/src/list.lisp index 0f95f42..15a433f 100644 --- a/src/list.lisp +++ b/src/list.lisp @@ -58,9 +58,10 @@ (defmacro pop (place) (multiple-value-bind (dummies vals newval setter getter) (get-setf-expansion place) - (let ((car-symbol (gensym))) + (let ((head (gensym))) `(let* (,@(mapcar #'list dummies vals) - (,car-symbol (car ,getter)) - (,(car newval) (cdr ,getter))) + (,head ,getter) + (,(car newval) (cdr ,head)) + ,@(cdr newval)) ,setter - ,car-symbol)))) + (car ,head)))))