I'm considering implementing, maybe as a library or a pull-request to racket/dict, contracts for (partially) specifying which keys exist in a dictionary and a contract for the value on that key. I've got a quick prototype here:
https://gist.github.com/wilbowma/7e97c8a38130c720568d008b288466f0 (dictof (id expr) ...) A contract for a dictionary that contains exactly the keys id ... that map to values that satisfy the contracts expr ... (respectively). (rho-dictof (id expr) ...) A contract for a dictionary that contains at least the keys id ... that map to values that satisfy the contracts expr ... (respectively). Before I start documenting and making it a thing, I thought I'd solicit feedback. -- William J. Bowman -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20201030024046.GK1611044%40williamjbowman.com.

