From 34e9698ec9f10c85b5223d154a7f4fe21c07c706 Mon Sep 17 00:00:00 2001 From: Owen Rodley Date: Sun, 28 Apr 2013 00:33:31 +1200 Subject: [PATCH] Fix POP --- src/list.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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))))) -- 1.7.10.4