Chapter 3, Modularity, Objects, and State
The idea is to save the new value and return the new value. And if called first time then use 0 as old-value.
1 (define f ((lambda(old) (lambda(x) (let ((temp old)) (set! old x) temp))) 0))
Thus DrRacket evaluates from left to right.