mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 05:06:37 +02:00
Simpler odd?.
This commit is contained in:
parent
f32daf3b96
commit
d17720018c
1 changed files with 1 additions and 1 deletions
|
@ -1102,7 +1102,7 @@
|
|||
(define (positive? x) (> x 0))
|
||||
(define (negative? x) (< x 0))
|
||||
(define (even? n) (= (remainder n 2) 0))
|
||||
(define (odd? n) (= (abs (remainder n 2)) 1))
|
||||
(define (odd? n) (not (= (remainder n 1) 0)))
|
||||
|
||||
(define (abs x) (if (< x 0) (- x) x))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue