X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flist.lisp;h=ddaeb569a50648b5de9a905a93a52a8033f45174;hb=c79c3adff52293988ece14b5cdb01f9bb7027645;hp=f1d5afbf68604cf2a54371ce3a280dd9d3087ac2;hpb=24cc0831844f88e223ce2e5ff8bb5a0b9621c026;p=jscl.git diff --git a/src/list.lisp b/src/list.lisp index f1d5afb..ddaeb56 100644 --- a/src/list.lisp +++ b/src/list.lisp @@ -54,3 +54,9 @@ (cons (subst new old (car tree) :key key :test test) (subst new old (cdr tree) :key key :test test))) (t tree))) + +(defmacro pop (place) + (let ((car-symbol (gensym))) + `(let ((,car-symbol (car ,place))) + (setf ,place (cdr ,place)) + ,car-symbol)))