The when-first macro will evaluate the xs expression twice. Admittedly, it does exactly what the doc string says, but that seems undesirable to me. Even without side effects, there's a potential performance issue if xs is some expensive operation.
Patch attached. The main diff is:
- `(when (seq ~xs)
+ `(when-let [xs# (seq ~xs)]
Mac OS X 10.8.1, Java 1.7.0_06