Closed shriram closed 4 months ago
All the examples in the docs
https://pyret.org/docs/latest/string-dict.html#%28part._string-dict_.String.Dict_string-dict_set%29
only show updates to existing fields, misleading readers into thinking you can't use this to extend a dictionary. A test like this can help:
check: s1 = [string-dict: ] s2 = s1.set("Hello", "World") s2.get("Hello") is some("World") end
Thanks to Sam Weiss (CSCI 0190) for pointing this out!
All the examples in the docs
https://pyret.org/docs/latest/string-dict.html#%28part._string-dict_.String.Dict_string-dict_set%29
only show updates to existing fields, misleading readers into thinking you can't use this to extend a dictionary. A test like this can help:
Thanks to Sam Weiss (CSCI 0190) for pointing this out!