more
parent
140c0476c6
commit
81cb14d964
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,16 +1,17 @@
|
||||
#lang debug racket/base
|
||||
(require racket/file
|
||||
racket/fasl
|
||||
racket/vector
|
||||
"words.rkt")
|
||||
(provide (all-defined-out))
|
||||
|
||||
(define lengthidx-file "data/lengthidx.rktd")
|
||||
(define lengthidx-file "compiled/lengthidx.rktd")
|
||||
|
||||
(define (regenerate-length-index!)
|
||||
(s-exp->fasl (map string-length usable-words) (open-output-file lengthidx-file #:exists 'replace)))
|
||||
(s-exp->fasl (vector-map string-length usable-words) (open-output-file lengthidx-file #:exists 'replace)))
|
||||
|
||||
(define lengthidx (let ()
|
||||
(unless (file-exists? lengthidx-file)
|
||||
(regenerate-length-index!))
|
||||
(list->vector (fasl->s-exp (open-input-file lengthidx-file)))))
|
||||
(fasl->s-exp (open-input-file lengthidx-file))))
|
||||
|
||||
|
Loading…
Reference in New Issue