This commit is contained in:
msyds committed 2026-09-16 06:28:21 -06:00
1 parent 7700b231c9
commit 0f1287b760
4 files changed
+15 -16

No files matched your search

+2 -14
View File
@@ -86,6 +86,8 @@
(swap! symtable-ref #(assoc-in % [sym scopes] bind))
{bind denot}))
(declare expand)
(defmethod expand-primitive 'lambda
[datum _ env symtable-ref scopes]
(let [[_ formals & body] datum
@@ -98,20 +100,6 @@
(for [e body]
(expand e env* symtable-ref scopes*)))))
(comment (assert (lookup ['lambda #{}]
scheme-base-env
(symtable-for-env scheme-base-env))))
(comment
(nearest ['x #{0 1 2}]
#{#{0}
#{0 1}
#{0 3}}))
(comment
(expand 'x)
(expand '(lambda (x) x)))
(defn expand
([datum]
(expand