Minor scheme changes
This commit is contained in:
parent
095ced6f03
commit
4f8459ae64
@ -76,14 +76,14 @@
|
||||
(define (desugar-body body)
|
||||
(match body
|
||||
['() '()]
|
||||
[`(,e) (desugar-exp e)]
|
||||
[`(. ,e*) `(begin ,@(map desugar-exp e*))]))
|
||||
[(e) (desugar-exp e)]
|
||||
[(e* ...) `(begin ,@(map desugar-exp e*))]))
|
||||
|
||||
|
||||
;; A-Normalization
|
||||
;; All arguments to lambdas are atomic, all lets have
|
||||
;; <prgm> ::= <top> ...
|
||||
;; <top> ::= <def> | <exp>
|
||||
;; <def> ::= (define <var> <exp>)
|
||||
;; <exp> ::= <aexp>
|
||||
;; | <cexp>
|
||||
;; | (let ((<var> <exp>)) <exp>)
|
||||
@ -93,6 +93,7 @@
|
||||
;; <aexp> ::= (lambda (<var> ...) exp)
|
||||
;; | <num> | <var> | #t | #f
|
||||
;; Atomic expressions are guaranteed to terminate without side effects or errors
|
||||
;; - All arguments to lambdas are atomic
|
||||
;; - All complex (non-atomic) expressions are let-bound or in a tail position
|
||||
;; - All let expressions bind a single var
|
||||
;; - begin expressions are decomposed
|
||||
|
Loading…
Reference in New Issue
Block a user