let* appears to be doing the right thing with regards to tail behavior
This commit is contained in:
parent
e3ff7ce382
commit
13a29cee72
|
@ -511,6 +511,24 @@
|
||||||
(list (list 3 4 7)
|
(list (list 3 4 7)
|
||||||
(list 17 18 35)))
|
(list 17 18 35)))
|
||||||
|
|
||||||
|
(test (let* ([x 0]
|
||||||
|
[x (add1 x)]
|
||||||
|
[x (add1 x)])
|
||||||
|
x)
|
||||||
|
2)
|
||||||
|
|
||||||
|
|
||||||
|
(test (begin
|
||||||
|
(define (sum-iter x acc)
|
||||||
|
(if (= x 0)
|
||||||
|
acc
|
||||||
|
(let* ([y (sub1 x)]
|
||||||
|
[z (+ x acc)])
|
||||||
|
(sum-iter y z))))
|
||||||
|
(sum-iter 300 0))
|
||||||
|
45150
|
||||||
|
#:stack-limit 8
|
||||||
|
#:control-limit 1)
|
||||||
|
|
||||||
|
|
||||||
;(simulate (compile (parse '42) 'val 'next))
|
;(simulate (compile (parse '42) 'val 'next))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user