3 (define (or-gate o1 o2 output)
4 (define (or-action-procedure)
6 (logical-or (get-signal o1)
8 (after-delay or-gate-delay
10 (set-signal! output new-value)))))
12 (define (logicval-or o1 o2)
14 ((and (= o1 0) (= o1 0)) 0)
15 ((or (= o1 1) (= o2 1)) 1)
16 (else (error "invalid signals"))))
18 (add-action! o1 or-action-procedure)
19 (add-action! o2 or-action-procedure)