Question: Below is a question Im having issues with what I have so far will be after the ? Dont know y but it doesnt work...

Below is a question Im having issues with what I have so far will be after the ?

Dont know y but it doesnt work...

17.5 Here's a procedure that takes two numbers as arguments and returns whichever number is larger:

(define (max2 a b) (if (> b a) b a)) 

Use max2 to implement max, a procedure that takes one or more numeric arguments and returns the largest of them.

; Here's a procedure that takes two numbers as arguments and returns whichever ; number is larger: ; ; (define (max2 a b) ; (if (> b a) b a)) ; ; Use max2 to implement max, a procedure that takes one or more numeric arguments ; and returns the largest of them.

(define (max2 a b) (if (> b a) b a))

(define (maxxx n . the-rest) (if (null? the-rest) n (apply maxxx (cons (max2 n (car the-rest)) (cdr the-rest)))))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!