Not quite what I had in mind. The following examples must all work without errors:
#lang racket ;; set/define defined here (set/define h a 1) (set/define h a 2) (hash-set! h 'b 42) (define bar (make-hash)) (set/define bar a 1) (define (foo) (set/define local-h a 1) (set/define local-h a 2) (hash-set! local-h 'b 42) local-h) (foo) Basically, if the identifier h is unbound at runtime (set/define h key val) is the same as (define h (make-hash)) (hash-set! h 'key val) If h is bound (hash-set! h 'key val) -- 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. For more options, visit https://groups.google.com/d/optout.