support element lookup on transient sets

Description

This is related to https://dev.clojure.org/jira/browse/CLJ-700

contains? doesnt work on transient collections

Now of course the expectation of how data.int-map should work is the same as with a general set so I dont complain there. However, a workaround shown in this thread: https://groups.google.com/forum/#!topic/clojure/lQVmZ-jcdiU is to use the set directly as a function:

;; this works
((transient #{1 2 3}) 2)
;=> 2

;; this doesnt
((transient (int-set #{1 2 3})) 2)
;=> CompilerException java.lang.IllegalArgumentException: contains? not supported on type: clojure.data.int_map.TransientIntSet

I checked the code and the TransientIntSet supports the contain method of the TransientIntSet interface which could be used directly and return the correct value but it is definitely not idiomatic to recur to interop nor have to look that around for this specific case.

Environment

Clojure 1.9-aplha17

Assignee

Zach Tellman

Reporter

import

Labels

None

Approval

None

Patch

None

Priority

Major
Configure