I have the following piece of ClojureScript code within a go block:
(cond
(and (vector? x) (= (first x) :some-key)) ...)
This generates the following piece of JavaScript code for the cond case:
if (40 === f) {
return
d = b(link: 9),
f = cljs.core.vectorQMARK.call(null, d),
d = cljs.core.first.call(null, d),
d = cljs.core.EQ.call(null, d, new cljs.core.Keyword(null, "some-key", "some-key", -978969032)),
cljs.core.truth_(f && d) ? b(link: 1) = 42 : b(link: 1) = 43,
new cljs.core.Keyword(null, "recur", "recur", -437573268);
}
This looks to me like both and arguments would actually get evaluated. As a result my code crashes whenever it hits this cond case and 'x' is not seqable.