It used to be the case that the map passed to assoc-some could be nil, but the recent changes made to improve performance mean this now doesn't work if more than one key is supplied.
I don't know if we're supposed to rely on the behaviour of assoc-some (or even Clojure core's assoc) when the supplied map is nil as it's not specifically documented from what I can see, but looking at the Java implementation of assoc it does specifically check for null and return a new map in that case. Obviously feel free to close this if you don't feel it's documented behaviour.
It used to be the case that the map passed to
assoc-some
could benil
, but the recent changes made to improve performance mean this now doesn't work if more than one key is supplied.e.g.:
but
I don't know if we're supposed to rely on the behaviour of
assoc-some
(or even Clojure core'sassoc
) when the supplied map isnil
as it's not specifically documented from what I can see, but looking at the Java implementation ofassoc
it does specifically check fornull
and return a new map in that case. Obviously feel free to close this if you don't feel it's documented behaviour.Thanks!