> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (define cpt-table-as-vector (make-vector 256))
> (for ([ent (in-list cpt-table)])
>  (match ent
>    [(list k sym)
>     (vector-set! cpt-table-as-vector k (cons k sym))]
>    [(list k k* sym)
>     (for ([i (in-range k k*)])
>       (vector-set! cpt-table-as-vector i (cons k sym)))]))

... but of course I need to process the list in reverse order so that
earlier entries take priority over ones later in the cpt-table list.
Otherwise, I don't preserve the program's meaning.  Whoops.  :)

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to