 
 (deftype ViewPath [view-fn])
 
-(extend-protocol StructurePath
+(extend-protocol p/StructurePath
   ViewPath
   (select* [^ViewPath this structure next-fn]
-    (->> structure ((.view-fn this)) next-fn))
+    (->> structure ((field this 'view-fn)) next-fn))
   (transform* [^ViewPath this structure next-fn]
-    (->> structure ((.view-fn this)) next-fn)
+    (->> structure ((field this 'view-fn)) next-fn)
     ))
 
 (deftype PutValCollector [val])
 
-(extend-protocol Collector
+(extend-protocol p/Collector
   PutValCollector
   (collect-val [^PutValCollector this structure]
-    (.val this)
-    ))
-
-
-(extend-protocol StructurePath
+    (field this 'val)
+    ))
+
+
+(extend-protocol p/StructurePath
   nil
   (select* [this structure next-fn]
     (next-fn structure))

              )]
    (->TransformFunctions StructureValsPathExecutor afn afn)))


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

(defn coerce-structure-path [this]
  (let [pimpl (structure-path-impl this)


(deftype AllStructurePath [])

(extend-protocol p/StructurePath
  AllStructurePath
  (select* [this structure next-fn]
    (into [] (r/mapcat next-fn structure)))
