clr

Schofie 2023-08-31T22:34:35.410109Z

There may be other ways, but you can use .TryAdd. It returns a Boolean rather than throwing an exception, but if the map is a variable then its value will be changed.

(let [d (some Generic.Dictionary akin to {:foo "bar"})]
  (.TryAdd d :baz "qux") 
  d)
Should return {:foo "bar", :baz "qux"}