3.8 Exercise 3.8
I feel like I’ve come up with an ugly solution. I’m going to mark this as TODO for now.
(define f (let ((y 0)) (lambda (x) (if (= y 0) (begin (set! y x) 0) (begin (set! y x) 1)))))
I verified that this worked by swapping the order of the calls. Assuming the order of evaluation is fixed, this should demonstrate the different behaviors that would happen if the order of evaluation was actually changed.