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

Test mutual recursion in let* without vectors, which are deferrable.

Thanks to bjh21 for spotting this inconsistency.
This commit is contained in:
Nicolas Boulenguez 2019-05-28 16:36:21 +02:00
parent 8150202bed
commit 8734e2eb01

View File

@ -201,9 +201,9 @@ 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))
(let* (f (fn* (n) (if (= n 0) 0 (g (- n 1)))) g (fn* (n) (f n))) (f 2))
;=>0