a puzzle
another version of scale-vector?
- (define (scale-vector! v k) (set! v (cons (* k (car v)) (* k (cdr v)))))
won’t work because
- creates a new cons cell
- doesn’t change the existing one
- draw env diagram for (scale-vector! v k)
hangs a new frame in which v points to the same cell as v in the global frame
changes this binding, but never changes that cell!