change ((fn [x] (if (nil? x) a b)) z) to (if-let [x z] b a)