Welcome! Please see the About page for a little more info on how this works.

+2 votes
in ClojureScript by

Posting as a followup from a conversation on the Clojurians Slack.

The following shows that find is not implemented for ClojureScript on transient maps:

cljs.user=> (def m (transient {}))
cljs.user=> (def m (assoc! m :a 1))
cljs.user=> (find m :a)

Alex Miller believes that this was addressed in Clojure in https://clojure.atlassian.net/projects/CLJ/issues/CLJ-700
That ticket addresses contains? on transient hash-maps, which is likely similar, but this function already works in ClojureScript:

cljs.user=> (contains? m :a)

Note that (get m :a) also works.

Please log in or register to answer this question.