所以我写了这段代码。如何在if语句中获取x以进行评估?此刻,x总是成功,if语句永远不会失败。
(define expand
(lambda (exp)
(cond
((symbol? exp) exp)
((pair? exp)
(case (car exp)
((and)
(if (null? (cdr exp)) '(quote #t)
(if (null? (cddr exp)) (cadr exp)
(let ((x (cadr exp))
(thunk (lambda () (expand '(and ,(cddr exp))))))
(if x (thunk)
`(quote ,x))))))
(else exp)))
(else exp))))