[bugfix] even? and odd? broken
This commit is contained in:
parent
9ab446ab92
commit
df18df8868
|
@ -191,7 +191,7 @@
|
||||||
(< x 0))
|
(< x 0))
|
||||||
|
|
||||||
(define (even? x)
|
(define (even? x)
|
||||||
(= x (* (/ x 2) 2)))
|
(= x (* (exact (floor (/ x 2))) 2)))
|
||||||
|
|
||||||
(define (odd? x)
|
(define (odd? x)
|
||||||
(not (even? x)))
|
(not (even? x)))
|
||||||
|
|
Loading…
Reference in New Issue