Question: SICP DrRacket 1. Define a one-parameter procedure prev that returns as its value the argument that was passed to it the previous time it was
SICP DrRacket
1. Define a one-parameter procedure prev that returns as its value the argument that was passed to it the previous time it was called. The first time prev is called it should return the symbol *first-call*.
> (prev 'a) *first-call* > (prev 3) a > (prev (+ 1 5)) 3
2. Define a procedure make-prev that can be used to create the procedure prev described in problem 1. make-prev should take as an argument the value that should be returned by the first call to prev. That is, if we
(define prev (make-prev '*first-call*))
prev should behave as shown above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
