scoping.zy 283 B

12345678910111213141516171819202122
  1. (letseq [a 0
  2. b a]
  3. (assert (== b 0)))
  4. (let [a 5]
  5. (let []
  6. (def a 6)
  7. (assert (== a 6)))
  8. (assert (== a 5)))
  9. (newScope
  10. (def b 12)
  11. (newScope
  12. (def b 99)
  13. (newScope
  14. (def b 7)
  15. (assert (== b 7)))
  16. (assert (== b 99)))
  17. (assert (== b 12)))