function | previously cljs.spec/abbrev | Edit |
(abbrev form)
(defn abbrev [form]
(cond
(seq? form)
(walk/postwalk (fn [form]
(cond
(c/and (symbol? form) (namespace form))
(-> form name symbol)
(c/and (seq? form) (= 'fn (first form)) (= '[%] (second form)))
(last form)
:else form))
form)
(c/and (symbol? form) (namespace form))
(-> form name symbol)
:else form))