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

make-environment



I don't know if this is the right forum to raise this issue.  But, I wonder
why make-environment works the way it does.  If I define
	(define (complex x y)
            (make-environment
		(define re x)
		(define im y)))
	(define a (complex 1 2))
not only does a have re and im bound in it, but it also has x and y
bound in it.  So,
	(access x a)
yields 1.  From the description of make-environment in Abelson and Sussman,
it appears that only re and im should be bound in a.  Is this a bug, or a
feature, or am I missing something?  If this is the way make-environment
is supposed to work, is there some other primitive that binds re and im
and forgets about x and y?

Uday Reddy