From 13a29cee72682b834741dfc03d832ad8fef8186a Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Fri, 11 Mar 2011 15:10:50 -0500 Subject: [PATCH] let* appears to be doing the right thing with regards to tail behavior --- test-compiler.rkt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/test-compiler.rkt b/test-compiler.rkt index 1de2f7e..19f9e09 100644 --- a/test-compiler.rkt +++ b/test-compiler.rkt @@ -510,7 +510,25 @@ (list x y z))) (list (list 3 4 7) (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))