I have a piece of code in scheme that uses several lambdas. It basically returns a number that's in the middle.
(define foo
(lambda (x)
(letrec
((h (lambda (y z)
(cond
((null? y) 'undefined)
((null? (cdr y)) (car z))
(else (h (cddr y) (cdr z)))))))
((lambda (y) (h y y)) x))))
I have to rewrite the code so it doesn't use any lambda. How do I do that?