summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-09 06:56:38 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-09 06:56:38 -0800
commit90387d6938c74b4db30d28ad375b8b3de7d377be (patch)
tree1926f3c59d243d1612f1b5529ee713b695982ee2
parentf955a8e92c01e13ba3889777c9d56367157f9b04 (diff)
downloadtxr-90387d6938c74b4db30d28ad375b8b3de7d377be.tar.gz
txr-90387d6938c74b4db30d28ad375b8b3de7d377be.tar.bz2
txr-90387d6938c74b4db30d28ad375b8b3de7d377be.zip
matcher: match-guard: use op list, and zip.
* share/txr/stdlib/match.tl (match-guard assignments): Use simpler op expression to generate a function that produces set assignments. (match-guard lets): Use zip function instead of mapcar with ret and quasiquote.
-rw-r--r--share/txr/stdlib/match.tl4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/txr/stdlib/match.tl b/share/txr/stdlib/match.tl
index afdf0c35..ea298ffd 100644
--- a/share/txr/stdlib/match.tl
+++ b/share/txr/stdlib/match.tl
@@ -36,10 +36,10 @@
(test-expr t)
(:method assignments (me)
- (mapcar (ret ^(set ,@1 ,@2)) me.vars me.var-exprs))
+ (mapcar (op list 'set) me.vars me.var-exprs))
(:method lets (me)
- (mapcar (ret ^(,@1 ,@2)) me.pure-temps me.pure-temp-exprs)))
+ (zip me.pure-temps me.pure-temp-exprs)))
(defstruct guard-disjunction ()
guard-chains