On 2/14/20, 'John Clements' via users-redirect <us...@plt-scheme.org> wrote: > I think I may understand what’s going on here, but a student and I worked on > this for quite a while today before I found the problem. > > .... > > In this case, one easy error is to change the ‘cast’ into an ‘ann’, which > works fine.
You can also declare a type for `top-store`, instead of the hash expression: #lang typed/racket (define-type Store (Mutable-HashTable Integer Value)) (define-type Value (U Real Boolean String)) (: top-store Store) (define top-store (make-hash (list (cons -1 14) (cons 1 #t) (cons 2 #f)))) (hash-set! top-store 5 1234) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAFUu9R6rzKL_A8H2YjiDhS_JT7W%3DZ%3DTq8hVmccsQTTu9f%3DDrcQ%40mail.gmail.com.