1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-16 17:20:23 +03:00

Add test for atoms "leaking" out of let* binds

(hopefully) closes #490
This commit is contained in:
Ali Mohammad Pur 2020-01-16 00:55:12 +03:30 committed by GitHub
parent d40f588823
commit 306ba5eb43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,12 @@
(f)
;=>9
;; Testing whether closures can retain atoms
(def! g (let* (atm (atom 0)) (fn* () (deref atm))))
(def! atm (atom 1))
(g)
;=>0
;>>> deferrable=True
;;
;; -------- Deferrable Functionality --------