 (defn- promotion-path-sub [visited arg-spec x]
   (cond
     (contains? visited arg-spec) nil
-    (matches-arg-spec? arg-spec x) []
+    (matches-arg-spec? arg-spec x) (transient [])
     :default (let [visited (conj visited arg-spec)
                    chain (trace-arg-spec-chain arg-spec)
                    candidates (transduce

                                              (when-let
                                                  [p (promotion-path-sub
                                                      visited k x)]
                                                (conj p kv)))))
                                     (filter identity))
                               (completing shortest-path)
                               nil

  nil)

(defn promotion-path [arg-spec x]
  (if-let [result (promotion-path-sub #{} arg-spec x)]
    (persistent! result)))

(defn promote-along-path
  ([promotion-path x]
