cljs.spec.alpha/abbrev

functionpreviously cljs.spec/abbrevEdit
(abbrev form)

Source code @ clojurescript:src/main/cljs/cljs/spec/alpha.cljs
(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))