Implement till 4.50

This commit is contained in:
2021-02-23 16:31:09 -05:00
parent 320e620a30
commit 88859171ba
2 changed files with 75 additions and 1 deletions

View File

@@ -366,6 +366,9 @@
(define (amb? exp) (tagged-list? exp 'amb))
(define (amb-choices exp) (cdr exp))
(define (ramb? exp) (tagged-list? exp 'ramb))
(define (ramb-choices exp) (cdr exp))
;; analyze from 4.1.6, with clause from 4.3.3 added
;; and also support for Let
(define (analyze exp)
@@ -381,6 +384,7 @@
((cond? exp) (analyze (cond->if exp)))
((let? exp) (analyze (let->combination exp))) ;**
((amb? exp) (analyze-amb exp)) ;**
((ramb? exp) (analyze-ramb exp)) ;**
((application? exp) (analyze-application exp))
(else
(error "Unknown expression type -- ANALYZE" exp))))