tests
This commit is contained in:
1 parent
7700b231c9
commit
0f1287b760
4 files changed
+15
-16
No files matched your search
+2
-14
@@ -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
|
||||
|
||||
Reference in new issue
Block a user