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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started