          (clojure.string/join ";")
          (format "\33[%sm"))))
 
+(defn first-wins
+  [kv-coll]
+  (->> kv-coll
+       (partition 2)
+       reverse
+       (map vec)
+       (into {})))
+
 (defn slicky-match
   [i len sl]
   (when-not (-> sl first #{:start :end})


(defn slinky->str
  [sl n]
  (let [[& {:keys [start end]}] sl]
    (->> [[(slinky-part->str start nil)]
          (map #(slinky-part->str
                 (slinky-first-match sl

(defn base-indent-slinky
  [& {:keys [override underride]
      :or {override [] underride []}}]
  (concat override
          [:start " "
           :end " "
           :default (fn [i]
                      {:fg* i :text "|"})]
          underride))
