Well, you can replace the expression lambdain letrecwith an internal definition:
(define (foo x)
(define (h y z)
(cond
((null? y) 'undefined)
((null? (cdr y)) (car z))
(else (h (cddr y) (cdr z)))))
(h x x))
... Or you can extract the procedure hout fooas an auxiliary procedure. In any case, the result will be the same.
source
share