(define section (lambda (proc . sparams) (lambda params (let kernel ((sparams sparams) (params params) (acc null)) ; (display (list 'kernel sparams params acc)) (newline) (cond ; If we've run out of all parameters, apply the procedure ((null? sparams) (if (null? params) (apply proc (reverse acc)) (error "Too many parameters"))) ; If the next section parameter is a "hole", use the next ; input parameter. ((eq? (car sparams) '?) (if (not (null? params)) (kernel (cdr sparams) (cdr params) (cons (car params) acc)) (error "Too few parameters"))) ; Otherwise, use the section parameter. (else (kernel (cdr sparams) params (cons (car sparams) acc)))))))) (define sub2 (section - '? 2)) (define 2sub (section - 2 '?)) (define valid-grade? (section <= 0 '? 100))