summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-11-22 06:54:49 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-11-22 06:54:49 -0800
commit3f4b4dc10fa7e2d099b2ba0dfef78c108a671ec9 (patch)
tree65901085ab2db26d1d15f890c15c132d45b81c10 /lib.c
parent01d5eb034e3c325dfceb0a29caadc0b5e756de47 (diff)
downloadtxr-3f4b4dc10fa7e2d099b2ba0dfef78c108a671ec9.tar.gz
txr-3f4b4dc10fa7e2d099b2ba0dfef78c108a671ec9.tar.bz2
txr-3f4b4dc10fa7e2d099b2ba0dfef78c108a671ec9.zip
lastcons: streamline.
* lib.c (lastcons): Don't wastefully call cdr on an object after called cdr_l; just dereference the cdr_l loc.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 08deb233..8bc522c1 100644
--- a/lib.c
+++ b/lib.c
@@ -635,7 +635,7 @@ loc lastcons(val list)
while (consp(cdr(list))) {
ret = cdr_l(list);
- list = cdr(list);
+ list = deref(ret);
}
return ret;
}