summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-09-03 23:45:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-09-03 23:45:03 -0700
commitd87cea357b752768accab13f1f052eba099c8efc (patch)
tree3c0b3215b6b6e597f2fe41c5f7d32e1105a460da /share
parent8fdc890bfaae2df85d5437d9ae495c45a54645c4 (diff)
downloadtxr-d87cea357b752768accab13f1f052eba099c8efc.tar.gz
txr-d87cea357b752768accab13f1f052eba099c8efc.tar.bz2
txr-d87cea357b752768accab13f1f052eba099c8efc.zip
list-builder: use copy-list, not copy.
* share/txr/stdlib/build.tl (list-buider add, list-builder add*, list-builder pend, list-builder pend*): Use copy-list rather than copy. This copies terminating atoms without complaining.
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/build.tl12
1 files changed, 6 insertions, 6 deletions
diff --git a/share/txr/stdlib/build.tl b/share/txr/stdlib/build.tl
index a5960578..41826255 100644
--- a/share/txr/stdlib/build.tl
+++ b/share/txr/stdlib/build.tl
@@ -33,14 +33,14 @@
(:method add (self . items)
(let ((tl self.tail))
- (usr:rplacd tl (copy (cdr tl)))
+ (usr:rplacd tl (copy-list (cdr tl)))
(set tl (last tl))
(usr:rplacd tl items)
(set self.tail tl))
nil)
(:method add* (self . items)
- (let ((ic (copy items))
+ (let ((ic (copy-list items))
(h self.head))
(usr:rplacd (last ic) (cdr h))
(usr:rplacd h ic))
@@ -49,11 +49,11 @@
(:method pend (self . lists)
(let ((tl self.tail))
(while lists
- (usr:rplacd tl (copy (cdr tl)))
+ (usr:rplacd tl (copy-list (cdr tl)))
(set tl (last tl))
(let ((nx (car lists)))
(usr:rplacd tl (if (tailp tl nx)
- (copy nx)
+ (copy-list nx)
nx)))
(set lists (cdr lists)))
(set self.tail tl))
@@ -64,12 +64,12 @@
(nh (cons nil nil))
(tl nh))
(while lists
- (usr:rplacd tl (copy (cdr tl)))
+ (usr:rplacd tl (copy-list (cdr tl)))
(set tl (last tl))
(usr:rplacd tl (car lists))
(set lists (cdr lists)))
(set tl (last tl))
- (usr:rplacd tl (if (tailp tl h) (copy h) h))
+ (usr:rplacd tl (if (tailp tl h) (copy-list h) h))
(set self.head nh))
nil)