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

T -> Scheme


You claim that it is easy to eliminate T expressions which define
symbols inside of LAMBDAs.  I see how that works for certain cases,
but how would you rewrite this?

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

I can think of ways of doing it, such as this:

    (define y
	(let ((x ...))
	      (lambda ...)
	      ((z-def self)
	       (lambda ...)))))
    (define z (z-def y))

or this:

    (lset dummy
	(let ((x ...))
	     (object ()
	      ((y-def self) ...)
	      ((z-def self) ...)))

    (define y (y-def dummy))
    (define z (z-def dummy))

but I don't find either particularly elegant.  Is there a better
way?  If not, then I'm not sure that changing the semantics of embedded
DEFINEs is such a good idea.