3.34 Exercise 3.34
Let’s try what Louis suggests for ourselves:
(define (squarer a b) (multiplier a a b))
> (define A (make-connector)) > (define B (make-connector)) > (squarer A B) #<procedure>
> (probe "A" A) #<procedure>
> (probe "B" B) #<procedure>
> (set-value! A 2 'user)
Probe: A = 2
Probe: B = 4
'done
> (forget-value! A 'user)
Probe: A = ?
Probe: B = ?
'done
> (set-value! B 25 'user)
Probe: B = 25
'done
The problem here is that, although it is possible to square the value in A in order to derive B, we do not have a mechanism to do the reverse, because both of the multiplicands are the same – if we forget one of them, we forget them both, and can’t get anywhere anymore.