summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-18 07:17:46 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-18 07:17:46 -0800
commit4d3ccb0eeaaf426c43f2bb4554b2dbbc08fd5f19 (patch)
treefa51e773ba25c798668c1ed5b66104eb60bd45b1
parentdccede2656904b54d686fde770ded84b36d18021 (diff)
downloadtxr-4d3ccb0eeaaf426c43f2bb4554b2dbbc08fd5f19.tar.gz
txr-4d3ccb0eeaaf426c43f2bb4554b2dbbc08fd5f19.tar.bz2
txr-4d3ccb0eeaaf426c43f2bb4554b2dbbc08fd5f19.zip
compiler: reduce (list* x) to x.
* share/txr/stdlib/compiler.tl (reduce-lisp): Add one more reduction case. There is a "hit" for this somewhere, because even though this adds code, overall 200 bytes are saved over the entire library.
-rw-r--r--share/txr/stdlib/compiler.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index d406c6bc..8652948f 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -1470,7 +1470,7 @@
form (match-case form
((append (list . @largs) . @aargs)
^(list* ,*largs (append ,*aargs)))
- ((append @arg) arg)
+ ((@(or append list*) @arg) arg)
(@(require (list* . @(listp @args))
(equal '(nil) (last args)))
^(list ,*(butlastn 1 args)))