[CS logo]

CMSC 11500 - Introduction to Computer Programming
Max


(define (slow-max alon)
;; Assume a non-empty list of POSITIVE numbers
;; slowmax: (listof number) -> number
;; To find the maximum number in the list; 0 if empty list
  (cond ((null? alon) 0)
        (else (< (car alon) (max (cdr alon)))
	         (max (cdr alon))
               (car alon)))))