1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-19 09:38:28 +03:00

Merge pull request #391 from asarhaddon/test-let-recursive-def

Test mutual recursion in let*
This commit is contained in:
Joel Martin 2019-05-28 13:22:41 -04:00 committed by GitHub
commit a10fc90306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,8 +201,10 @@ a
;; Testing recursive function in environment.
(let* [cst (fn* [n] (if (= n 0) nil (cst (- n 1))))] (cst 1))
(let* (cst (fn* (n) (if (= n 0) nil (cst (- n 1))))) (cst 1))
;=>nil
(let* (f (fn* (n) (if (= n 0) 0 (g (- n 1)))) g (fn* (n) (f n))) (f 2))
;=>0
;>>> deferrable=True