 
 (deftype FirstStructurePath [])
 
-(extend-protocol StructurePath
+(extend-protocol p/StructurePath
   FirstStructurePath
   (select* [this structure next-fn]
     (next-fn (first structure)))

        optimized performance. Instead, you should extend the protocols via an
        explicit extend-protocol call. \n" obj))

(defn find-protocol-impl! [prot obj]
  (let [ret (find-protocol-impl prot obj)]
    (if (= ret obj)
      (throw-illegal (no-prot-error-str obj))
      ret
      )))

(defn- seq-contains? [aseq val]
  (->> aseq
       (filter (partial = val))
       empty?
       not))

#?(
:clj

    ))
)

#?(:clj
(do
(defn structure-path-impl [this]
  (if (fn? this)
    ;;TODO: this isn't kosher, it uses knowledge of internals of protocols
    (-> p/StructurePath :impls (get clojure.lang.AFn))
    (find-protocol-impl! p/StructurePath this)))

(defn collector-impl [this]
  (find-protocol-impl! p/Collector this))

(defn structure-vals-path-impl [this]
  (find-protocol-impl! p/StructureValsPath this))
))

#?(:cljs
(do
(defn structure-path-impl [_]
  {:select* (fn [this structure next-fn] (select* this structure next-fn))
   :transform* (fn [this structure next-fn] (transform* this structure next-fn))
   })

(defn collector-impl [_]
  {:collect-val (fn [this structure] (collect-val this structure))
   })

(defn structure-vals-path-impl [_]
  {:select-full* (fn [this structure next-fn] (select-full* this structure next-fn))
   :transform-full* (fn [this structure next-fn] (transform-full* this structure next-fn))
   })
))

(defn coerce-structure-vals-path [this]
  (let [pimpl (structure-vals-path-impl this)
        selector (:select-full* pimpl)
        transformer (:transform-full* pimpl)]
    (->TransformFunctions
