I do not understand why my function to get the largest number does not want to work. If I am thinking about this correctly, if the first atom is smaller than the second atom the
(define (max-list-element list) (define (aux list actual-max) (if (pair? (cdr list)) (if (>= (car list) actual-max) (aux (cdr list) (car list)) (aux (cdr list) actual-max)) (if (> (car list) actual-max) (car list) actual-max))) (aux list (car list)))
My implementation.