(Defun max2 (x) (if (null (cdr x)) (car x) (if (> (car x) (max2(cdr x))) (car x) (cdr x) ) ) )

When I input (max2 (list 4 9 )) I get (9).

When I input (max2 (list 4 1 )) I get 4(no parentheses).

When I input (max2 (list 4 1 9)) I get (9) is not a real number.

The error is in the first if statement it is not getting the cdr out correctly, I think.

Any help would be appreciated