im trying to convert from a let-form to an unamed procedure form and i just can't get the hang of it.
the let procedure is this.
(define max-recursive (lambda (lst)
(if (null? (cdr lst))
(car lst)
(let ((m0 (car lst))
(m1 (max-recursive (cdr lst))))
(if (> m0 m1)
m0
m1
)
)
)))
and what i've done so far is this
(define max-recursive (lambda (lst)
(if (null? (cdr lst))
(car lst)
((lambda (m0 m1)
(if (> m0 m1)
m0
m1
)
)
car lst (max-recursive (cdr lst)))
)))
any help would be appreciated thank you.