fix benchmark on empty input

This commit is contained in:
Matthew Flatt 2012-11-15 05:06:07 -07:00
parent 6ee62ec5ad
commit 719ada1baa

View File

@ -25,7 +25,7 @@
(real->decimal-string (* 100 (/ (cdr a) total)) 3)))))
(define (write-one-freq table key)
(let ([cnt (hash-ref table key 0)])
(let ([cnt (hash-ref table key (box 0))])
(printf "~a\t~a\n" (unbox cnt) key)))
(define dna