I'm looking for a function along the lines of java.util.List.indexOf,
and I'm having a hard time believing it's not there in the core or at
least contrib. I was expecting to find something like this:
(defn index-of [coll item]
(let [index (.indexOf (sequence coll) item)]
(if (neg? index)
I have some patches I'd like to submit, but I'm having trouble with
the submission process. I've sent in a CA, and my name is on the
contributor list (at http://clojure.org/contributing), but I still
can't submit tickets on Assembla, and my membership to clojure-dev is
still pending. Do I need to
The Clojure compiler is not very helpful when it comes to debugging
exceptions that occur while macros are being expanded. As an example,
consider this code:
;; macro-fail.clj
(defmacro broken [] (/ 0 0))
(broken)
Here's the stack trace I get when I compile this file:
Exception in thread main