projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add POP macro
[jscl.git]
/
src
/
list.lisp
diff --git
a/src/list.lisp
b/src/list.lisp
index
f1d5afb
..
ddaeb56
100644
(file)
--- 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)))
(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)))