From a1df6e56b05a0b0b60165ab3be96b39b1cd8237d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sun, 20 Sep 2026 06:36:45 -0600 Subject: [PATCH] fix regensym --- src/expand.clj | 2 +- test/expand_test.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/expand.clj b/src/expand.clj index 84d7e4b..4ebafb0 100644 --- a/src/expand.clj +++ b/src/expand.clj @@ -524,7 +524,7 @@ (into % (map-indexed (fn [n a] - [a (symbol (str "s" (+ (dec (count r)) n)))]) + [a (symbol (str "s" (+ (count %) n)))]) r))))] #_(->Variable sym (set (map #(get syms %) scopes))) [sym (set (map #(get syms %) scopes))]) diff --git a/test/expand_test.clj b/test/expand_test.clj index bc54ca1..309f577 100644 --- a/test/expand_test.clj +++ b/test/expand_test.clj @@ -85,7 +85,7 @@ (t/is (= '(let (([x #{s0}] 123)) (let-syntax ((m (syntax-rules () ((m) x)))) (lambda ([x #{s1 s2 s0}]) - [x #{s0}]))) + [x #{s0 s3}]))) (sut/rg-expand '(let ((x 123)) (let-syntax ((m (syntax-rules ()