Welcome! Please see the About page for a little more info on how this works.
After discussing it on Slack, the following definitely feels like a bug. At the very least, it throws weirdly in CLJS while it is perfectly (and intuitively) fine in Clojure JVM.
;; Fine, of course, but now...
;; Throws: Error: Cannot compare :a to 100
Andy Fingerhut pointed to a difference in implementation. Clojure compares by reference and CLJS by value, forcing a deep comparison. Even then, I find the error cryptic and argue that logically speaking, Clojure makes sense.
Citing him, Clojure implementation:
And CLJS implementation:
Is there something we didn't see?
What is really cryptic is that other updates to nested sorted maps are just fine, as far as I experimented, even mixed with unsorted ones. Here, it specifically fails because there is a common subpath (ie. [3 1]).