- (defn foo
- [x y & args]
- (->> args
- (partition 2)
- (keep #(and (first %) (second %)))
- (map (juxt (comp x first)
- (comp y second)))
- (into {})))
user=> (foo identity inc :a 1 :b 2 :c 3)
{:c 4, :b 3, :a 2}
user=> (foo identity inc :a 1 :b 2 :c 3)
{:c 4, :b 3, :a 2}