The equivalent clojure code would be:
(defn f [a b]
(let [res (join "," (sort (distinct (mapcat keys [a b]))))]
(if (empty? res) "<none>" res)))
Also I'm not a Scala expert, but I think you want .keySet instead of .keys, otherwise they won't be unique, right?