fixed contracts for dict-update, dict-update!

Closes PR 11228
This commit is contained in:
Ryan Culpepper 2010-09-18 15:10:36 -06:00
parent 3325350026
commit d60e868da3

View File

@ -181,11 +181,13 @@
(->i ([d (and/c dict? dict-mutable?)]
[k (d) (dict-key-contract d)]
[update (d) (-> (dict-value-contract d) (dict-value-contract d))])
([default (d) (or/c (dict-value-contract d) (-> (dict-value-contract d)))]) ;; use if/c
[_ void?])]
[dict-update
(->i ([d (and/c dict? dict-can-functional-set?)]
[k (d) (dict-key-contract d)]
[update (d) (-> (dict-value-contract d) (dict-value-contract d))])
([default (d) (or/c (dict-value-contract d) (-> (dict-value-contract d)))]) ;; use if/c ?
[_ dict?])]
[dict-remove!
dict-remove!-contract]