             dsts (equivalent-targets g dst)]
         (loop []
           (when-some [^ConversionPath p (poll)]
-            (let [curr (or (-> p .path last second) src)]
+            (let [curr (or (-> p .path peek second) src)]
               (if (some #(assignable? curr %) dsts)
                 p
                 (do (run! (fn [[[src dst] c]]

   (fn [vs]
     (let [vs (vec vs)]
       (replace-range vs
                      ((.f conv) (subvec vs (first idxs) (inc (last idxs))))
                      idxs)))
   (.cost conv)])


    (->> (continuous-combinations (.arity src))
         (mapcat
           (fn [idxs]
             (let [^Types input (types (subvec (.types src) (first idxs) (inc (peek idxs))))]
               (->> (possible-conversions g input)
                    (filter (fn [[[_ ^Types replacement] _]]
                              (>= max-arity (+ (.arity replacement)
