summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/txr/stdlib/compiler.tl5
1 files changed, 2 insertions, 3 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index f62f5fb1..ff769a0f 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -1280,11 +1280,10 @@
(defun expand-and (form)
(match-case form
((and) t)
+ ((and @a) a)
((and @(true-const-p) . @rest) (expand-and ^(and ,*rest)))
((and nil . @rest) nil)
- ((and @a) a)
- ((and @a @b) ^(if ,a ,b))
- ((and @a . @rest) (expand-and ^(and ,a ,(expand-and ^(and ,*rest)))))
+ ((and @a . @rest) ^(if ,a ,(expand-and ^(and ,*rest))))
(@else else)))
(defun flatten-or (form)