if
(define (eval-if exp env) ; exp = (if pred-part then-part else-part)
  (let ((pred-part (cadr exp))
        (then-part (caddr exp))
        (else-part (cadddr exp)))
    (if (base-eval pred-part env)
        (base-eval then-part env)
        (base-eval else-part env))))

一覧 前へ 次へ