[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

T -> Scheme



I think that there is a serious misunderstanding here.  The expression

(let ((x ...))
  (define y ...)
  (define z ...))

defines Y and Z internal to the LET, not outside of it!!  More
precisely, you think this means

(let ((x ...))
  (define y)
  (define z)
  (set! y ...)
  (set! z ...)

when in fact it means

(define y)
(define z)
(let ((x ...))
  (set! y ...)
  (set! z ...))

where (DEFINE <name>) just adds a name to the local frame.  In MIT
Scheme, LET is a frame definer.