Finish section 4.3
This commit is contained in:
@@ -397,14 +397,6 @@
|
|||||||
; nondeterministic program, we would have had to implement it as a special
|
; nondeterministic program, we would have had to implement it as a special
|
||||||
; form. This would require syntax procedures
|
; form. This would require syntax procedures
|
||||||
|
|
||||||
(define (require? exp) (tagged-list? exp 'require))
|
|
||||||
|
|
||||||
(define (require-predicate exp) (cadr exp))
|
|
||||||
|
|
||||||
; and a new clause in the dispatch in analyze
|
|
||||||
|
|
||||||
; ((require? exp) (analyze-require exp))
|
|
||||||
|
|
||||||
; as well the procedure analyze-require that handles require expressions.
|
; as well the procedure analyze-require that handles require expressions.
|
||||||
; Complete the following definition of analyze-require.
|
; Complete the following definition of analyze-require.
|
||||||
|
|
||||||
@@ -413,8 +405,8 @@
|
|||||||
(lambda (env succeed fail)
|
(lambda (env succeed fail)
|
||||||
(pproc env
|
(pproc env
|
||||||
(lambda (pred-value fail2)
|
(lambda (pred-value fail2)
|
||||||
(if <??>
|
(if (not (true? pred-value))
|
||||||
<??>
|
(fail2)
|
||||||
(succeed 'ok fail2)))
|
(succeed 'ok fail2)))
|
||||||
fail))))
|
fail))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user