             [structural-typing.assist.oopsie :as oopsie]
             [structural-typing.guts.preds.wrap :as wrap]))
 
-(extend-type clojure.lang.Keyword
-  sp/StructurePath
-  (select* [kw structure next-fn]
+
+;; NOTE: I don't know why Specter requires `extend-type/extend-protocol` instead of
+;; defining the protocol functions in the deftype. But it does.
+
+(deftype KeywordVariantType [keyword])
+
+(extend-type KeywordVariantType
+  sp/StructurePath
+  (select* [this structure next-fn]
     (cond (map? structure)
-          (next-fn (get structure kw))
+          (next-fn (get structure (.-keyword this)))
 
           (nil? structure)
           (next-fn nil)
 
           :else
           (boom! "%s is not a map" structure)))
-  (transform* [kw structure next-fn]
-    (assoc structure kw (next-fn (get structure kw)))
-    ))
-
-(extend-type java.lang.Long
-  sp/StructurePath
-  (select* [this structure next-fn] 
+  (transform* [this structure next-fn] (boom! "structural-typing does not use transform")))
+
+(defmethod clojure.core/print-method KeywordVariantType [o, ^java.io.Writer w]
+  (.write w (str (.-keyword o))))
+
+
+(deftype IntegerVariantType [value])
+  
+(extend-type IntegerVariantType
+  sp/StructurePath
+  (select* [this structure next-fn]
     (cond (nil? structure)
           (next-fn nil)
           

                        (surround-with-index-collector elt))
                  :indexed-path)

           :else
           (recur remainder (conj specter-path elt) path-type))))



          :else
          (try
            (next-fn (nth structure (.-value this)))
            (catch IndexOutOfBoundsException ex
              (next-fn nil)))))
  (transform* [kw structure next-fn] (boom! "structural-typing does not use transform")))

(defmethod clojure.core/print-method IntegerVariantType [o, ^java.io.Writer w]
  (.write w (str (.-value o))))




                                 ;;; ALL, RANGE
