> In particular, the following is illegal, but both guile & STk allow
> it:
> guile> (define (f x y)
> (define r1 (* x y))
> (define r2 (* 2 r1))
> (list r1 r2))
When you take this a few steps further, you can actually cause Guile
(and SCM I think) to loose:
(define (f x y)
(define r1 (* x y))
(define (bar)
r1)
(define r2 (* 2 (bar)))
(bar))
(foo 1 2)
=> #<procedure bar ()> ;; OOPS - should be 2
So don't fo this. Ideally, Guile should produce a error for this, at
least the debugging evaluator.