Guest User

Untitled

a guest
Sep 14th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. A Scheme interpreter that passes only relevant subsets of environments to eval
  2. (let ([x 1]
  3. [y 2])
  4. (+ x 3))
  5.  
  6. (let ([x 1]
  7. [y 2])
  8. (lambda (z) ;; free vars = {x}
  9. (+ x z))
  10.  
  11. (let ([x some-big-object])
  12. (f (g x) long-running-expression-not-involving-x))
  13.  
  14. (let ([x some-big-object])
  15. (let ([tmp1 (g x)])
  16. (set! x #f)
  17. (let ([tmp2 long-running-expression-not-involving-x])
  18. (f tmp1 tmp2))))
Add Comment
Please, Sign In to add comment