mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 13:55:55 +03:00
Add intermediate test for env/fn interaction
It should pass on existing implementations because it is a prerequisite for an existing test, but small independent tests are easyer to debug on new implementations.
This commit is contained in:
parent
894b24d892
commit
7a45dc5851
@ -204,6 +204,8 @@ a
|
||||
|
||||
|
||||
;; Testing recursive function in environment.
|
||||
(let* (f (fn* () x) x 3) (f))
|
||||
;=>3
|
||||
(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))
|
||||
|
Loading…
Reference in New Issue
Block a user