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

Expunge LETREC, BEGIN and SEQUENCE.



Local defines in MIT-Scheme (which I believe is the only one that
originally implemented them) do not cause side effects to
environments.

(define (foo x)
  (define (bar y)
    (+ y (baz x)))
  (define (baz w)
    (* w x))
  ...
  )

is equivalent to

(define (foo x)
  (letrec ((bar (named-lambda (bar y) (+ y (baz x))))
	   (baz (named-lambda (baz w) (* w x))))
	  ...))