Skip to content

Commit dec08ef

Browse files
committed
Update 5B.scm
1 parent 7fa03fc commit dec08ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

code/5B.scm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ Implementing a Primitive
3838
(define (inverter in out)
3939
(define (invert-in)
4040
((let
41-
((now (logical not (get-signal in))))
41+
((now (logical-not (get-signal in))))
4242
(after-delay inverter-delay
4343
(lambda ()
4444
(set-signal! out now))))))
4545
(add-action! in invert-in))
4646

4747
(define (logical-not s)
4848
(cond
49-
((- s 0) 1)
50-
((- s 1) 0)
49+
((= s 0) 1)
50+
((= s 1) 0)
5151
(else
5252
(error "invalid signal" s))))
5353
;# END SLIDE
@@ -258,4 +258,4 @@ QUEUE
258258

259259
(define (set-cdr! x)
260260
(x (lambda (a d sa sd) (sd y))))
261-
;# END SLIDE
261+
;# END SLIDE

0 commit comments

Comments
 (0)