20 hours ago
my attempt to do the exercises in sicp.
Saturday, March 13, 2010
sicp exercise 3.28
; Exercise 3.28. Define an or-gate as a primitive function box. Your or-gate constructor should be similar to and-gate.
(define (or-gate a b out)
(let ((new-value (logical-or (get-signal a) (get-signal b))))
(set-signal! out new-value)))))
(add-action! a or-action-procedure)
(add-action! a or-action-procedure))