From 4d3ccb0eeaaf426c43f2bb4554b2dbbc08fd5f19 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 18 Feb 2021 07:17:46 -0800 Subject: 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. --- share/txr/stdlib/compiler.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))) -- cgit v1.2.3