Fix collatz typed benchmark for fix to odd? and even?.
This commit is contained in:
parent
091e26cde8
commit
193bff7a2b
|
@ -10,7 +10,9 @@
|
|||
[(odd? n)
|
||||
(+ 1 (cycle-length (+ 1 (* 3 n))))]
|
||||
[(even? n)
|
||||
(+ 1 (cycle-length (/ n 2)))]
|
||||
;; TR note: quotient would work better, but that's the other version of
|
||||
;; the benchmark
|
||||
(+ 1 (cycle-length (assert (/ n 2) integer?)))]
|
||||
[else (error "unreachable")]))
|
||||
|
||||
(time (let: loop : (U False Integer)
|
||||
|
|
Loading…
Reference in New Issue
Block a user