Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

02 Legislative and regulatory processes.

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago