parent 7e67837b
...@@ -129,13 +129,12 @@ ...@@ -129,13 +129,12 @@
(define env (make-fluid '())) (define env (make-fluid '()))
(<define> (add_env n x) (<define> (add_env n x)
(with-fluid-guard-dynamic-object env (fluid-guard-dynamic-object env)
(<lambda> () (<code> (let lp ((r (fluid-ref env)) (n (<scm> n)) (x (<scm> x)))
(<code> (let lp ((r (fluid-ref env)) (n (<scm> n)) (x (<scm> x))) (if (pair? n)
(if (pair? n) (lp (cons (cons (tosym (car n))
(lp (cons (cons (tosym (car n)) (car x)) r) (cdr n) (cdr x))
(car x)) r) (cdr n) (cdr x)) (fluid-set! env r)))))
(fluid-set! env r)))))))
(<define> (unify_env n x) (<define> (unify_env n x)
(<recur> lp ((n n) (x x)) (<recur> lp ((n n) (x x))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment