On Mon 17 Mar 2014 at 09:16:25PM -0700, Timothy Pratley wrote: > Is there a better way to write > > (cond > (neg? 1) "neg" > (zero? 1) "zero" > (pos? 1) "pos" > :default "default") … > But I think I'm missing a more idiomatic approach.
FWIW, the `compare` function works well in this particular case. (["neg" "zero" "pos"] (inc (compare x 0))) guns
pgpnKxNxu6_4y.pgp
Description: PGP signature