You can declare "local" variables in Racket via the use of the let function. For example, try the following code: (define a 2);;binding a variable to a value (define b 3) (define c 4) (define (strange...


You can declare "local" variables in Racket via the use of the let function. For example, try the following code:


(define a 2);;binding a variable to a value


(define b 3)


(define c 4)


(define (strange x)


    (let ((a 1) (b 2))


      (+ x a b))))


After executing this code, what are the values of a, b, and c? What is the return value when you make the call (strange 4)? Explain your answers.



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here