           value x]
      (if (empty? promotion-path)
        value
-       (let [[[k promoter] & r] promotion-path
+       (let [[v & r] promotion-path
+             k (:key v)
+             promoter (:promoter v)
              _ (assert (or (not check?)
                            (matches-arg-spec? k value)))
              next-value (promoter value)]

                    "There are several equally long paths to promote value"
                    {:value x
                     :paths (for [c candidates]
                              (let [c (persistent! c)]
                                (conj (mapv first c)
                                      arg-spec)))})))))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                              (filter identity)
                              cat
                              (map (fn [kv]
                                     (let [[k v] kv
                                           v (assoc v :key k)]
                                       (when-let
                                           [p (promotion-path-sub
                                               visited k x)]
                                         (conj p v)))))
                              (filter identity))
                        (completing shortest-path)
                        nil
