Finish section 4.3

main
Felix Martin 2021-02-27 19:17:07 -05:00
parent 5067f5414c
commit 8dd54d429c
1 changed files with 2 additions and 10 deletions

View File

@ -397,14 +397,6 @@
; nondeterministic program, we would have had to implement it as a special
; 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.
; Complete the following definition of analyze-require.
@ -413,8 +405,8 @@
(lambda (env succeed fail)
(pproc env
(lambda (pred-value fail2)
(if <??>
<??>
(if (not (true? pred-value))
(fail2)
(succeed 'ok fail2)))
fail))))