Question: I keep getting this code when I run Online Scheme compiler Codingground simply easy coding: CODE is below ERROR: real number required, but got #

I keep getting this code when I run Online Scheme compiler Codingground simply easy coding: CODE is below ERROR: real number required, but got # Stack Trace: _______________________________________ 0 (max list) At line 1 of "./main.sc"

When I run the program below

(DEFINE (max list)

(COND

((NULL? list) ())

((NULL? (CDR list)) (CAR list))

((> (CAR list) (max (CDR list))) (CAR list))

(ELSE (max (CDR list)))

)

)

(DEFINE (min list)

(COND

((NULL? list) ())

((NULL? (CDR list)) (CAR list))

((< (CAR list) (min (CDR list))) (CAR list))

(ELSE (min (CDR list)))

)

)

(DEFINE (minmax list) (CONS (min list) (CONS (max list) '())))

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!