In order to determine if an element is contained in the collection, it may be easiest to use theVector.indexOf()
function from java:
(.indexOf (range 10) 5) ;=> 5 (.indexOf [:a :b :c] :b) ;=> 1
--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev...@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojure-dev.
For more options, visit https://groups.google.com/d/optout.
Hi everyone,
I want a single, standard function that everyone uses, which can be applied to sequential collections (not including hashmap).For example, we can add the following to core or somewhere:(defn has?[s item](.contains s))